[Checkins] [zopefoundation/ZODB] f4e920: Fix testMinimizeTerminates

GitHub noreply at github.com
Wed Jul 13 16:16:50 CEST 2016


  Branch: refs/heads/master
  Home:   https://github.com/zopefoundation/ZODB
  Commit: f4e9202f6b24571df6bb4b86acf2bacbfda7845a
      https://github.com/zopefoundation/ZODB/commit/f4e9202f6b24571df6bb4b86acf2bacbfda7845a
  Author: Jim Fulton <jim at zope.com>
  Date:   2016-07-12 (Tue, 12 Jul 2016)

  Changed paths:
    M src/ZODB/tests/testCache.py

  Log Message:
  -----------
  Fix testMinimizeTerminates

This test was spewing exceptions without failing for ZODB5.

The spew was an indication that something was wrong in this case. (The
test was broken.)

There had been some bug in the object cache that caused an infinite
loop when objects woke themselves up while being reaped.  This test is
a regression test for that bug.

The test was sloppy about transaction managers.  The test class
creates a bunch of connections using the threaded transaction manager,
but this test used a thread to execute the critical code.  As a
result, the synchronization methods weren't called.  This didn't
matter much with ZODB4.  The objects were still able to load their
state.

With ZODB5, the synchronization methods are important for proper MVCC
and because they weren't called, the objects' state couldn't be
reloaded, with 2 effects:

- Spew

- The test wasn't really testing that object's that reloaded
  themselves didn't create an infinite loop.

Changed the test to not use a threaded transaction manager.


  Commit: 61af5586f6141ed2a4c0141c46234bffed1e3507
      https://github.com/zopefoundation/ZODB/commit/61af5586f6141ed2a4c0141c46234bffed1e3507
  Author: Jim Fulton <jim at jimfulton.info>
  Date:   2016-07-13 (Wed, 13 Jul 2016)

  Changed paths:
    M src/ZODB/tests/testCache.py

  Log Message:
  -----------
  Merge pull request #90 from zopefoundation/fix-testMinimizeTerminates

Fix testMinimizeTerminates


Compare: https://github.com/zopefoundation/ZODB/compare/5fa51838f396...61af5586f614


More information about the checkins mailing list