• Jim Fulton's avatar
    Fix testMinimizeTerminates · f4e9202f
    Jim Fulton authored
    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.
    f4e9202f
testCache.py 17.8 KB