Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
022e6dfe
Commit
022e6dfe
authored
Jul 15, 2010
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use wait_until to avoid spurious test failures on challenged machines.
parent
c5e74dc3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
src/ZEO/tests/invalidations_while_connecting.test
src/ZEO/tests/invalidations_while_connecting.test
+8
-6
src/ZEO/tests/testConnection.py
src/ZEO/tests/testConnection.py
+1
-1
No files found.
src/ZEO/tests/invalidations_while_connecting.test
View file @
022e6dfe
...
...
@@ -4,7 +4,7 @@ Invalidations while connecting
As
soon
as
a
client
registers
with
a
server
,
it
will
recieve
invalidations
from
the
server
.
The
client
must
be
careful
to
queue
these
invalidations
until
it
is
ready
to
deal
with
them
.
At
the
time
of
the
writing
of
this
test
,
clients
weren
't careful enogh about
of
the
writing
of
this
test
,
clients
weren
't careful eno
u
gh about
queing invalidations. This led to cache corruption in the form of
both low-level file corruption as well as out-of-date records marked
as current.
...
...
@@ -72,11 +72,13 @@ This tests tries to provoke this bug by:
...
db
=
ZODB
.
DB
(
ZEO
.
ClientStorage
.
ClientStorage
(
addr
,
client
=
'x'
))
...
_
=
lock
.
acquire
()
...
try
:
...
time
.
sleep
(
.
1
)
...
assert
(
db
.
storage
.
lastTransaction
()
...
==
db
.
storage
.
_server
.
lastTransaction
()),
(
...
db
.
storage
.
lastTransaction
(),
...
db
.
storage
.
_server
.
lastTransactiion
())
...
wait_until
(
"connected and we've caught up"
,
...
lambda
:
...
db
.
storage
.
is_connected
()
...
and
db
.
storage
.
lastTransaction
()
...
==
db
.
storage
.
_server
.
lastTransaction
()
...
)
...
...
conn
=
db
.
open
()
...
for
i
in
range
(
1000
)
:
...
if
conn
.
root
()[
i
]
.
value
!=
conn2
.
root
()[
i
]
.
value
:
...
...
src/ZEO/tests/testConnection.py
View file @
022e6dfe
...
...
@@ -135,7 +135,7 @@ def test_suite():
suite
.
addTest
(
sub
)
suite
.
addTest
(
doctest
.
DocFileSuite
(
'invalidations_while_connecting.test'
,
setUp
=
setupstack
.
setUpDirectory
,
tearDown
=
setupstack
.
tearDown
,
setUp
=
ZEO
.
tests
.
forker
.
setUp
,
tearDown
=
setupstack
.
tearDown
,
))
suite
.
layer
=
ZODB
.
tests
.
util
.
MininalTestLayer
(
'ZEO Connection Tests'
)
return
suite
...
...
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