TestLockDir.test_35_wait_lock_changing is timing-dependent
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
=======
FAIL: test_35_
vvvv[log from bzrlib.
INFO locked check and checked locks
INFO lock2: waiting for check lock
INFO lock1: releasing check lock
INFO lock1: waiting 1 for checked lock
INFO lock2: acquired check lock
INFO lock2: releasing checked lock
INFO lock1: acquired for checked lock
INFO lock1: released lockdir
INFO lock1: acquiring lockdir
INFO lock1: releasing check lock
INFO lock1: acquired lockdir
INFO lock1: waiting 2 for checked lock
INFO lock2: waiting for check lock
INFO lock2: acquired check lock
INFO lock2: releasing checked lock
INFO lock1: acquired for checked lock
INFO lock2: waiting for check lock
INFO lock2: acquired check lock
INFO lock2: releasing checked lock
82.559 opening working tree '/tmp/testbzr-
^^^^[log from bzrlib.
-------
Traceback (most recent call last):
File "/home/
self.
AssertionError: not equal:
a = 2
b = 1
-------
Ran 1843 tests in 80.635s
FAILED (failures=1, known_failure_
14 tests skipped
Changed in bzr: | |
assignee: | nobody → mbp |
importance: | Undecided → Medium |
status: | New → Confirmed |
tags: | added: lockdir selftest |
tags: | added: check-for-breezy |
Notes:
A problem here is that the tests should be observing static events in a deterministic way, rather than trying to measure them in real time.
I think we can test that more easily if we add interfaces saying "I failed to get the lock", "I'm going to sleep waiting for the lock" and then we can just test them in isolation -- both the default implementation and also as a point to hook in for more testing. This should help other UIs that want different reporting while waiting for locks or to override the policy.
Open questions: wait_lock currently takes parameters saying how long to wait and how often to try - are these still needed if not used from the test suite?
If the UI wants to override these methods, presumably it would want to do so across all locks. Should it just patch them into the LockDir class?