[MERGE] Fix "LockableFiles ... was gc'd while unlocked" warning in blackbox.test_shelve.

Andrew Bennetts andrew.bennetts at canonical.com
Thu Jan 29 02:33:04 GMT 2009


This patch fixes some UserWarnings from blackbox.test_shelve that look like:

/home/andrew/code/bzr/bzrlib/lockable_files.py:116: UserWarning: LockableFiles(<bzrlib.transport.local.LocalTransport url=file:///tmp/testbzr-cSCAvR.tmp/bzrlib.tests.blackbox.test_shelve.TestShelveList.test_shelf_order/work/.bzr/repository/>) was gc'd while locked
  warnings.warn("%r was gc'd while locked" % self)
/home/andrew/code/bzr/bzrlib/lockable_files.py:116: UserWarning: LockableFiles(<bzrlib.transport.local.LocalTransport url=file:///tmp/testbzr-cSCAvR.tmp/bzrlib.tests.blackbox.test_shelve.TestShelveList.test_shelve_no_message/work/.bzr/repository/>) was gc'd while locked
  warnings.warn("%r was gc'd while locked" % self)
/home/andrew/code/bzr/bzrlib/lockable_files.py:116: UserWarning: LockableFiles(<bzrlib.transport.local.LocalTransport url=file:///tmp/testbzr-cSCAvR.tmp/bzrlib.tests.blackbox.test_shelve.TestShelveList.test_shelve_one/work/.bzr/repository/>) was gc'd while locked
  warnings.warn("%r was gc'd while locked" % self)

I'm pretty sure this is causing intermittent test failures on PQM in
TestShelveList.test_shelve_no_message.  Here's one I got a short while ago:

...st_shelve.TestShelveList.test_shelve_no_message FAIL                  33ms
    not equal:
a = ''
b = 'Exception exceptions.UserWarning: <exceptions.UserWarning instance at
0x2b41d4505830> in <bound method LockableFiles.__del__ of LockableFiles(<bzrlib.transport.local.LocalTransport url=file:///tmp/testbzr-FhWJMj.tmp/bzrlib.tests.blackbox.test_shelve.TestShelveList.test_shelf_order/work/.bzr/repository/>)> ignored\n'

-Andrew.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: shelve-test-warnings-3965.patch
Type: text/x-diff
Size: 4101 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090129/793ef10d/attachment.bin 


More information about the bazaar mailing list