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
a9daebaf
Commit
a9daebaf
authored
Aug 30, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e87de948
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
4 deletions
+34
-4
go/neo/client/client.go
go/neo/client/client.go
+1
-1
go/neo/server/cluster_test.go
go/neo/server/cluster_test.go
+33
-3
No files found.
go/neo/client/client.go
View file @
a9daebaf
...
...
@@ -233,7 +233,7 @@ func (c *Client) talkMaster1(ctx context.Context) (err error) {
})
// init partition table from master
// XXX is this needed or we can expect master sending us pt via notify channel?
// XXX is this needed
at all
or we can expect master sending us pt via notify channel?
wg
.
Go
(
func
()
error
{
return
c
.
initFromMaster
(
ctx
,
Mlink
)
})
...
...
go/neo/server/cluster_test.go
View file @
a9daebaf
...
...
@@ -34,7 +34,7 @@ import (
"unsafe"
"lab.nexedi.com/kirr/neo/go/neo"
//
"lab.nexedi.com/kirr/neo/go/neo/client"
"lab.nexedi.com/kirr/neo/go/neo/client"
//"lab.nexedi.com/kirr/neo/go/zodb"
"lab.nexedi.com/kirr/neo/go/zodb/storage/fs1"
...
...
@@ -143,7 +143,7 @@ func (c *vclock) tick() { // XXX do we need tick?
//trace:import "lab.nexedi.com/kirr/neo/go/neo"
// M drives cluster with 1 S through recovery -> verification -> service -> shutdown
// M drives cluster with 1 S
& C
through recovery -> verification -> service -> shutdown
func
TestMasterStorage
(
t
*
testing
.
T
)
{
tracer
:=
&
MyTracer
{
xtesting
.
NewSyncTracer
()}
tc
:=
xtesting
.
NewTraceChecker
(
t
,
tracer
.
SyncTracer
)
...
...
@@ -169,6 +169,9 @@ func TestMasterStorage(t *testing.T) {
return
a
}
xnaddr
:=
func
(
addr
string
)
neo
.
Address
{
if
addr
==
""
{
return
neo
.
Address
{}
}
a
,
err
:=
neo
.
Addr
(
xaddr
(
addr
))
exc
.
Raiseif
(
err
)
return
a
...
...
@@ -212,6 +215,7 @@ func TestMasterStorage(t *testing.T) {
Mhost
:=
xnet
.
NetTrace
(
net
.
Host
(
"m"
),
tracer
)
Shost
:=
xnet
.
NetTrace
(
net
.
Host
(
"s"
),
tracer
)
Chost
:=
xnet
.
NetTrace
(
net
.
Host
(
"c"
),
tracer
)
gwg
:=
&
xsync
.
WorkGroup
{}
...
...
@@ -341,7 +345,33 @@ func TestMasterStorage(t *testing.T) {
// TODO S join while service
// TODO M.Stop while service
// + TODO Client connects here ?
// create client
C
:=
client
.
NewClient
(
"abc1"
,
"m:1"
,
Chost
)
// C connects M
tc
.
Expect
(
netconnect
(
"c:1"
,
"m:3"
,
"m:1"
))
tc
.
Expect
(
conntx
(
"c:1"
,
"m:3"
,
1
,
&
neo
.
RequestIdentification
{
NodeType
:
neo
.
CLIENT
,
UUID
:
0
,
Address
:
xnaddr
(
""
),
ClusterName
:
"abc1"
,
IdTimestamp
:
0
,
}))
// XXX vvv reenable
//tc.Expect(node(M.nodeTab, "", neo.CLIENT, 1, neo.RUNNING, 0.01))
tc
.
Expect
(
conntx
(
"m:3"
,
"c:1"
,
1
,
&
neo
.
AcceptIdentification
{
NodeType
:
neo
.
MASTER
,
MyUUID
:
neo
.
UUID
(
neo
.
MASTER
,
1
),
NumPartitions
:
1
,
NumReplicas
:
1
,
YourUUID
:
neo
.
UUID
(
neo
.
CLIENT
,
1
),
}))
_
=
C
// TODO S.Stop() or Scancel()
// expect:
...
...
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