Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
588abd65
Commit
588abd65
authored
Dec 28, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f0384a4c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
go/neo/client_test.go
go/neo/client_test.go
+15
-3
No files found.
go/neo/client_test.go
View file @
588abd65
...
@@ -398,7 +398,7 @@ func withNEOSrv(t *testing.T, f func(t *testing.T, nsrv NEOSrv), optv ...tOption
...
@@ -398,7 +398,7 @@ func withNEOSrv(t *testing.T, f func(t *testing.T, nsrv NEOSrv), optv ...tOption
// startNEOpy starts NEO/py server with database in workdir/
// startNEOpy starts NEO/py server with database in workdir/
// and preloads it with data according to opt.Preload.
// and preloads it with data according to opt.Preload.
startNEOpy
:=
func
(
t
*
testing
.
T
,
workdir
string
)
*
NEOPySrv
{
startNEOpy
:=
func
(
t
*
testing
.
T
,
workdir
string
,
opt
tOptions
)
*
NEOPySrv
{
X
:=
xtesting
.
FatalIf
(
t
)
X
:=
xtesting
.
FatalIf
(
t
)
neoOpt
:=
neoOpt
neoOpt
:=
neoOpt
...
@@ -435,7 +435,7 @@ func withNEOSrv(t *testing.T, f func(t *testing.T, nsrv NEOSrv), optv ...tOption
...
@@ -435,7 +435,7 @@ func withNEOSrv(t *testing.T, f func(t *testing.T, nsrv NEOSrv), optv ...tOption
inWorkDir
(
t
,
func
(
workdir
string
)
{
inWorkDir
(
t
,
func
(
workdir
string
)
{
X
:=
xtesting
.
FatalIf
(
t
)
X
:=
xtesting
.
FatalIf
(
t
)
npy
:=
startNEOpy
(
t
,
workdir
)
npy
:=
startNEOpy
(
t
,
workdir
,
opt
)
defer
func
()
{
defer
func
()
{
err
:=
npy
.
Close
();
X
(
err
)
err
:=
npy
.
Close
();
X
(
err
)
}()
}()
...
@@ -456,8 +456,20 @@ func withNEOSrv(t *testing.T, f func(t *testing.T, nsrv NEOSrv), optv ...tOption
...
@@ -456,8 +456,20 @@ func withNEOSrv(t *testing.T, f func(t *testing.T, nsrv NEOSrv), optv ...tOption
// start NEO/py first. We need it to create the
// start NEO/py first. We need it to create the
// database and to preload it, because NEO/go
// database and to preload it, because NEO/go
// does not currently support commit.
// does not currently support commit.
npy
:=
startNEOpy
(
t
,
workdir
)
npy
:=
startNEOpy
(
t
,
workdir
,
opt
)
err
:=
npy
.
Close
();
X
(
err
)
err
:=
npy
.
Close
();
X
(
err
)
// start NEO/py again to flush ttrans/tobj -> trans/obj tables
// if preload was requested. We need this because currently
// NEO/go does not implement recovery (which is write operation),
// and NEO/py leaves data after ZODB commit in ttrans/tobj (to
// be moved to trans/obj on next ZODB commit). See
// lab.nexedi.com/nexedi/neoppod/commit/7eb7cf1b
if
opt
.
Preload
!=
""
{
optRestart
:=
opt
optRestart
.
Preload
=
""
npy
=
startNEOpy
(
t
,
workdir
,
optRestart
)
err
=
npy
.
Close
();
X
(
err
)
}
// start NEO/go, as the database is created and preloaded
// start NEO/go, as the database is created and preloaded
ngo
,
err
:=
StartNEOGoSrv
(
neoOpt
);
X
(
err
)
ngo
,
err
:=
StartNEOGoSrv
(
neoOpt
);
X
(
err
)
...
...
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