Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
neo
Commits
946500ad
Commit
946500ad
authored
7 years ago
by
Kirill Smelkov
Browse files
Options
Download
Email Patches
Plain Diff
.
parent
3dd5bb53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
go/neo/server/cluster_test.go
go/neo/server/cluster_test.go
+7
-7
No files found.
go/neo/server/cluster_test.go
View file @
946500ad
...
...
@@ -183,7 +183,7 @@ func TestMasterStorage(t *testing.T) {
wg
:=
&
xsync
.
WorkGroup
{}
// start master
M
:=
NewMaster
(
"abc1"
,
":
0
"
,
Mhost
)
M
:=
NewMaster
(
"abc1"
,
":
1
"
,
Mhost
)
Mctx
,
Mcancel
:=
context
.
WithCancel
(
context
.
Background
())
wg
.
Gox
(
func
()
{
err
:=
M
.
Run
(
Mctx
)
...
...
@@ -192,14 +192,14 @@ func TestMasterStorage(t *testing.T) {
})
// expect:
tc
.
Expect
(
netlisten
(
"m:
0
"
))
tc
.
Expect
(
netlisten
(
"m:
1
"
))
// M.clusterState <- RECOVERY
// M.nodeTab <- Node(M)
// start storage
zstor
:=
xfs1stor
(
"../../zodb/storage/fs1/testdata/1.fs"
)
S
:=
NewStorage
(
"abc1"
,
"m:
0
"
,
":
0
"
,
Shost
,
zstor
)
S
:=
NewStorage
(
"abc1"
,
"m:
1
"
,
":
1
"
,
Shost
,
zstor
)
Sctx
,
Scancel
:=
context
.
WithCancel
(
context
.
Background
())
wg
.
Gox
(
func
()
{
err
:=
S
.
Run
(
Sctx
)
...
...
@@ -208,8 +208,8 @@ func TestMasterStorage(t *testing.T) {
})
// expect:
tc
.
Expect
(
netlisten
(
"s:
0
"
))
tc
.
Expect
(
netconnect
(
"s:
1
"
,
"m:
1
"
,
"m:
0
"
))
tc
.
Expect
(
netlisten
(
"s:
1
"
))
tc
.
Expect
(
netconnect
(
"s:
2
"
,
"m:
2
"
,
"m:
1
"
))
//tc.ExpectPar(
// nettx("s:1", "m:1", "\x00\x00\x00\x01"), // handshake
...
...
@@ -217,10 +217,10 @@ func TestMasterStorage(t *testing.T) {
//)
_
=
nettx
tc
.
Expect
(
conntx
(
"s:
1
"
,
"m:
1
"
,
1
,
&
neo
.
RequestIdentification
{
tc
.
Expect
(
conntx
(
"s:
2
"
,
"m:
2
"
,
1
,
&
neo
.
RequestIdentification
{
NodeType
:
neo
.
STORAGE
,
NodeUUID
:
0
,
Address
:
neo
.
Address
{
"s"
,
0
},
//XXX "s:
0
",
Address
:
neo
.
Address
{
"s"
,
1
},
//XXX "s:
1
",
ClusterName
:
"abc1"
,
IdTimestamp
:
0
,
}))
...
...
This diff is collapsed.
Click to expand it.
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