racetest: Add test for disconnect / invalidation race
This currently fails for ZEO (see Bug2 in https://github.com/zopefoundation/ZEO/issues/209 for details): (z-dev) kirr@deca:~/src/wendelin/z/ZEO5$ ZEO_MTACCEPTOR=1 zope-testrunner -fvvvx --test-path=src -t check_race_external_invalidate_vs_disconnect /home/kirr/src/wendelin/venv/z-dev/bin/zope-testrunner traceio=True /home/kirr/src/wendelin/z/ZEO5/src/ZEO/StorageServer.py:51: DeprecationWarning: The mtacceptor module is deprecated and will be removed in ZEO version 6. 'in ZEO version 6.', DeprecationWarning) Running tests at level 1 Running .BlobAdaptedFileStorageTests tests: Set up .BlobAdaptedFileStorageTests in 0.000 seconds. Running: check_race_external_invalidate_vs_disconnect (ZEO.tests.testZEO.BlobAdaptedFileStorageTests) (1.889 s) Failure in test check_race_external_invalidate_vs_disconnect (ZEO.tests.testZEO.BlobAdaptedFileStorageTests) Traceback (most recent call last): File "/usr/lib/python2.7/unittest/case.py", line 329, in run testMethod() File "/home/kirr/src/wendelin/z/ZODB/src/ZODB/tests/racetest.py", line 357, in check_race_external_invalidate_vs_disconnect T2ObjectsInc2Phase()) File "/home/kirr/src/wendelin/z/ZODB/src/ZODB/tests/util.py", line 400, in _ return f(*argv, **kw) File "/home/kirr/src/wendelin/z/ZODB/src/ZODB/tests/racetest.py", line 446, in _check_race_xxx_vs_external_disconnect self.fail('\n\n'.join([_ for _ in failure if _])) File "/usr/lib/python2.7/unittest/case.py", line 410, in fail raise self.failureException(msg) AssertionError: T15: obj1 (6) - obj2(4) != phase (1) obj1._p_serial: 0x03ea4cc505486777 obj2._p_serial: 0x03ea4cc503413799 phase._p_serial: 0x03ea4cc505486777 zconn_at: 0x03ea4cc505486777 # approximated as max(serials) zstor.loadBefore(obj1, @zconn.at) -> serial: 0x03ea4cc505486777 next_serial: None zstor.loadBefore(obj2, @zconn.at) -> serial: 0x03ea4cc504a74099 next_serial: None zstor.loadBefore(phase, @zconn.at) -> serial: 0x03ea4cc505486777 next_serial: None zstor._cache.clear() zstor.loadBefore(obj1, @zconn.at) -> serial: 0x03ea4cc505486777 next_serial: None zstor.loadBefore(obj2, @zconn.at) -> serial: 0x03ea4cc504a74099 next_serial: 0x03ea4cc506104155 zstor.loadBefore(phase, @zconn.at) -> serial: 0x03ea4cc505486777 next_serial: 0x03ea4cc506104155 T51: obj1 (6) - obj2(4) != phase (1) obj1._p_serial: 0x03ea4cc505486777 obj2._p_serial: 0x03ea4cc503413799 phase._p_serial: 0x03ea4cc505486777 zconn_at: 0x03ea4cc505486777 # approximated as max(serials) zstor.loadBefore(obj1, @zconn.at) -> serial: 0x03ea4cc505486777 next_serial: None zstor.loadBefore(obj2, @zconn.at) -> serial: 0x03ea4cc503413799 next_serial: None zstor.loadBefore(phase, @zconn.at) -> serial: 0x03ea4cc505486777 next_serial: None zstor._cache.clear() zstor.loadBefore(obj1, @zconn.at) -> serial: 0x03ea4cc505486777 next_serial: None zstor.loadBefore(obj2, @zconn.at) -> serial: 0x03ea4cc504a74099 next_serial: None zstor.loadBefore(phase, @zconn.at) -> serial: 0x03ea4cc505486777 next_serial: None
Showing
Please register or sign in to comment