[Zodb-checkins] CVS: ZODB3/ZEO/tests - testConnection.py:188.8.131.52
tim.one at comcast.net
Thu Aug 7 13:29:26 EDT 2003
Update of /cvs-repository/ZODB3/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv15095/ZEO/tests
WindowsConnectionTests.shutdownServer(): Grossly boost the sleep() at
the end. Before Python 2.3 there is no waitpid on Windows, and so no
way to know when a ZEO server has gone away. Tests calling
shutdownServer() assume the server has gone away when the method returns,
and can fail or hang if that isn't true. This is especially acute when
running Berkeley tests, because a Berkeley server seems to take longer
to shut itself down. The --all tests take longer on Windows now (this
patch has no effect on Linux), but did all pass for me on Win2K (incl.
the Berkeley tests).
=== ZODB3/ZEO/tests/testConnection.py 184.108.40.206 => 220.127.116.11 ===
--- ZODB3/ZEO/tests/testConnection.py:18.104.22.168 Mon Jul 28 14:59:50 2003
+++ ZODB3/ZEO/tests/testConnection.py Thu Aug 7 12:29:20 2003
@@ -104,8 +104,17 @@
time.sleep(0.5) # wait a bit and try again
self._servers[index] = None
- # XXX waitpid() isn't available until Python 2.3
+ # XXX waitpid() isn't available until Python 2.3, and this is
+ # XXX a serious problem for the tests: we've simply got no
+ # XXX way to know when the server process exits. So long as
+ # XXX the server process is alive, any file it passed to
+ # XXX lock_file() remains in the locked state, which can
+ # XXX cause the next test (or next phase of the current test)
+ # XXX to fail (due to being unable to lock the same file).
+ # XXX Berkeley servers seem to take the longest to exit.
+ # XXX About all we can do here is sleep, hoping that the server
+ # XXX goes away. 1.0 second isn't long enough. 5.0 should be.
class BDBConnectionTests(os.name == "nt" and WindowsConnectionTests
More information about the Zodb-checkins