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
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
a31d9af2
Commit
a31d9af2
authored
7 years ago
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e4a617ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
go/neo/server/cluster_test.go
go/neo/server/cluster_test.go
+15
-2
No files found.
go/neo/server/cluster_test.go
View file @
a31d9af2
...
...
@@ -121,9 +121,16 @@ func TestMasterStorage(t *testing.T) {
//net := xnet.NetTrace(pipenet.New(""), tracer) // test network
net
:=
pipenet
.
New
(
"testnet"
)
// test network
// syntatic shortcut for net tx events
// shortcut for addresses
xaddr
:=
func
(
addr
string
)
*
pipenet
.
Addr
{
a
,
err
:=
net
.
ParseAddr
(
addr
)
exc
.
Raiseif
(
err
)
return
a
}
// shortcut for net tx events
nettx
:=
func
(
src
,
dst
,
pkt
string
)
*
xnet
.
TraceTx
{
return
&
xnet
.
TraceTx
{
Src
:
net
.
Addr
(
src
),
Dst
:
net
.
A
ddr
(
dst
),
Pkt
:
[]
byte
(
pkt
)}
return
&
xnet
.
TraceTx
{
Src
:
xaddr
(
src
),
Dst
:
xa
ddr
(
dst
),
Pkt
:
[]
byte
(
pkt
)}
}
Mhost
:=
xnet
.
NetTrace
(
net
.
Host
(
"m"
),
tracer
)
...
...
@@ -144,7 +151,9 @@ func TestMasterStorage(t *testing.T) {
// expect:
//tc.ExpectNetListen("0")
println
(
"111"
)
tc
.
Expect
(
&
xnet
.
TraceListen
{
Laddr
:
"0"
})
println
(
"222"
)
// M.clusterState <- RECOVERY
// M.nodeTab <- Node(M)
...
...
@@ -164,11 +173,15 @@ func TestMasterStorage(t *testing.T) {
tc
.
Expect
(
&
xnet
.
TraceDial
{
Dst
:
"0"
})
//tc.ExpectNetDial("0")
println
(
"333"
)
tc
.
ExpectPar
(
nettx
(
"s:1"
,
"m:1"
,
"
\x00\x00\x00\x01
"
),
// handshake
nettx
(
"m:1"
,
"s:1"
,
"
\x00\x00\x00\x01
"
),
)
println
(
"444"
)
// XXX temp
return
...
...
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