[Zodb-checkins] CVS: ZODB3/ZEO/tests - testZEO.py:1.50
Guido van Rossum
guido@python.org
Sat, 28 Sep 2002 22:38:45 -0400
Update of /cvs-repository/ZODB3/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv22939
Modified Files:
testZEO.py
Log Message:
Tests for fallback should open the server with wait=1. (This didn't
work previously, but the combination of wait=1 and fallback mode now
works correctly -- it waits until connected.)
This prevents spurious ClientDisconnected exceptions.
=== ZODB3/ZEO/tests/testZEO.py 1.49 => 1.50 ===
--- ZODB3/ZEO/tests/testZEO.py:1.49 Thu Sep 26 11:56:01 2002
+++ ZODB3/ZEO/tests/testZEO.py Sat Sep 28 22:38:45 2002
@@ -383,7 +383,7 @@
# Start a read-only server
self._startServer(create=0, index=0, read_only=1)
# Start a read-only-fallback client
- self._storage = self.openClientStorage(wait=0, read_only_fallback=1)
+ self._storage = self.openClientStorage(wait=1, read_only_fallback=1)
# Stores should fail here
self.assertRaises(ReadOnlyError, self._dostore)
@@ -398,7 +398,7 @@
# Start a read-only server
self._startServer(create=0, index=0, ro_svr=1)
# Start a read-only-fallback client
- self._storage = self.openClientStorage(wait=0, read_only_fallback=1)
+ self._storage = self.openClientStorage(wait=1, read_only_fallback=1)
# Stores should fail here
self.assertRaises(ReadOnlyError, self._dostore)
@@ -492,9 +492,7 @@
# Start a read-only server
self._startServer(create=0, read_only=1)
# Start a client in fallback mode
- self._storage = self.openClientStorage(wait=0, read_only_fallback=1)
- # Poll until the client is connected
- self.pollUp()
+ self._storage = self.openClientStorage(wait=1, read_only_fallback=1)
# Stores should fail here
self.assertRaises(ReadOnlyError, self._dostore)