Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zodb
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
Joshua
zodb
Commits
5d592968
Commit
5d592968
authored
Sep 17, 2002
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide a timeout option on pollUp/pollDown, defaulting to 30 seconds.
parent
a1b5aae2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+12
-2
No files found.
src/ZEO/tests/testZEO.py
View file @
5d592968
...
...
@@ -279,15 +279,25 @@ class ConnectionTests(StorageTestBase.StorageTestBase):
pass
self
.
__super_tearDown
()
def
pollUp
(
self
):
def
pollUp
(
self
,
timeout
=
30.0
):
# Poll until we're connected
now
=
time
.
time
()
giveup
=
now
+
timeout
while
not
self
.
_storage
.
is_connected
():
asyncore
.
poll
(
0.1
)
now
=
time
.
time
()
if
now
>
giveup
:
self
.
fail
(
"timed out waiting for storage to connect"
)
def
pollDown
(
self
):
def
pollDown
(
self
,
timeout
=
30.0
):
# Poll until we're disconnected
now
=
time
.
time
()
giveup
=
now
+
timeout
while
self
.
_storage
.
is_connected
():
asyncore
.
poll
(
0.1
)
now
=
time
.
time
()
if
now
>
giveup
:
self
.
fail
(
"timed out waiting for storage to disconnect"
)
def
checkMultipleAddresses
(
self
):
for
i
in
range
(
4
):
...
...
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