Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
501f5aea
Commit
501f5aea
authored
Oct 04, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go/zodb/btree: tests: Don't forget to close storage
NOTE: db was already being closed in the test's code.
parent
762f2161
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
go/zodb/btree/btree_test.go
go/zodb/btree/btree_test.go
+4
-2
No files found.
go/zodb/btree/btree_test.go
View file @
501f5aea
...
@@ -105,6 +105,10 @@ func TestBTree(t *testing.T) {
...
@@ -105,6 +105,10 @@ func TestBTree(t *testing.T) {
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatal
(
err
)
t
.
Fatal
(
err
)
}
}
defer
func
()
{
err
:=
stor
.
Close
();
X
(
err
)
}()
db
:=
zodb
.
NewDB
(
stor
,
&
zodb
.
DBOptions
{})
db
:=
zodb
.
NewDB
(
stor
,
&
zodb
.
DBOptions
{})
defer
func
()
{
defer
func
()
{
err
:=
db
.
Close
();
X
(
err
)
err
:=
db
.
Close
();
X
(
err
)
...
@@ -118,8 +122,6 @@ func TestBTree(t *testing.T) {
...
@@ -118,8 +122,6 @@ func TestBTree(t *testing.T) {
t
.
Fatal
(
err
)
t
.
Fatal
(
err
)
}
}
// XXX close db/stor
// go through small test Buckets/BTrees and verify that Get(key) is as expected.
// go through small test Buckets/BTrees and verify that Get(key) is as expected.
for
_
,
tt
:=
range
smallTestv
{
for
_
,
tt
:=
range
smallTestv
{
xobj
,
err
:=
conn
.
Get
(
ctx
,
tt
.
oid
)
xobj
,
err
:=
conn
.
Get
(
ctx
,
tt
.
oid
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment