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
8e2007e6
Commit
8e2007e6
authored
Mar 14, 2012
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: fix random failures in ReplicationTests.testCheckReplicas
parent
b2a20553
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
neo/lib/connection.py
neo/lib/connection.py
+1
-0
neo/tests/threaded/__init__.py
neo/tests/threaded/__init__.py
+8
-0
neo/tests/threaded/testReplication.py
neo/tests/threaded/testReplication.py
+3
-1
No files found.
neo/lib/connection.py
View file @
8e2007e6
...
...
@@ -706,6 +706,7 @@ class ClientConnection(Connection):
self
.
_closure
()
else
:
self
.
_connectionCompleted
()
self
.
writable
()
def
_connectionCompleted
(
self
):
self
.
writable
=
super
(
ClientConnection
,
self
).
writable
...
...
neo/tests/threaded/__init__.py
View file @
8e2007e6
...
...
@@ -154,6 +154,11 @@ class SerializedEventManager(EventManager):
Serialized
.
pending
=
timeout
=
0
EventManager
.
_poll
(
self
,
timeout
)
def
addReader
(
self
,
conn
):
EventManager
.
addReader
(
self
,
conn
)
if
type
(
Serialized
.
pending
)
is
not
frozenset
:
Serialized
.
pending
=
1
class
Node
(
object
):
...
...
@@ -674,10 +679,13 @@ class NEOCluster(object):
@
staticmethod
def
tic
(
force
=
False
):
# XXX: Should we automatically switch client in slave mode if it isn't ?
neo
.
lib
.
logging
.
info
(
'tic ...'
)
if
force
:
Serialized
.
tic
()
neo
.
lib
.
logging
.
info
(
'forced tic'
)
while
Serialized
.
pending
:
Serialized
.
tic
()
neo
.
lib
.
logging
.
info
(
'tic'
)
def
getNodeState
(
self
,
node
):
uuid
=
node
.
uuid
...
...
neo/tests/threaded/testReplication.py
View file @
8e2007e6
...
...
@@ -27,7 +27,7 @@ from neo.storage.transactions import TransactionManager, \
from
neo.lib.connection
import
MTClientConnection
from
neo.lib.protocol
import
CellStates
,
ClusterStates
,
NodeStates
,
Packets
,
\
ZERO_OID
,
ZERO_TID
,
MAX_TID
from
neo.lib.util
import
p64
from
neo.lib.util
import
dump
,
p64
from
.
import
NEOCluster
,
NEOThreadedTest
,
Patch
,
predictable_random
from
neo.client.pool
import
CELL_CONNECTED
,
CELL_GOOD
...
...
@@ -239,6 +239,8 @@ class ReplicationTests(NEOThreadedTest):
def
corrupt
(
offset
):
s0
,
s1
,
s2
=
(
storage_dict
[
cell
.
getUUID
()]
for
cell
in
cluster
.
master
.
pt
.
getCellList
(
offset
,
True
))
neo
.
lib
.
logging
.
info
(
'corrupt partition %u of %s'
,
offset
,
dump
(
s1
.
uuid
))
s1
.
dm
.
deleteObject
(
p64
(
np
+
offset
),
p64
(
corrupt_tid
))
return
s0
.
uuid
def
check
(
expected_state
,
expected_count
):
...
...
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