• Kirill Smelkov's avatar
    X wcfs: Fix ZSync to close wconn on zdb.close, even if zconn stays alive · 7203d7ab
    Kirill Smelkov authored
    Even if ZODB DB is closed and releases zconn from its .pool, zconn can
    still stay alive being referenced from any other live python object -
    e.g. from a frame, a traceback etc. This situation in particular happens
    under ERP5's runUnitTest.
    
    As the result, if we don't hook into DB.close and close wconn only on
    zconn GC, files opened on WCFS filesystem stay opened, and WCFS server
    cannot be cleanly unmounted when test run completes.
    
    -> Fix it.
    
    P.S. ZODB@bbd03b3a is good, but does
    not really solve this problem because, once again, zconn stays
    referenced from objects besides DB.
    7203d7ab
_wczsync_test.py 4.55 KB