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
a9daebaf
Commit
a9daebaf
authored
Aug 30, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e87de948
Changes
2
Show 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