Test isolation: some test is switching to readonly mode and not switching back on teardown
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Benji York |
Bug Description
Here is a triplet of tests that provoke the get-stuck-
problem when run together:
lp.services.
lp.services.
lp.services.
(You can put the above three lines in a file and run the tests with
bin/test --load-list the_file.)
The first test appears to pass, the second then reports
AssertionError: newInteraction called while another interaction is active.
The third then fails thusly:
Failure in test lp.services.
Traceback (most recent call last):
_StringException: Traceback (most recent call last):
File "/home/
touch_
File "/home/
assert is_read_only(), "Switching to read-only failed."
AssertionError: Switching to read-only failed.
As a bonus, replace the first test with
lp.services.
And the same things will happen, except that the third test will switch
to failing this way:
Failure in test lp.services.
Traceback (most recent call last):
_StringException: Traceback (most recent call last):
File "/home/
remove_
File "/home/
assert not is_read_only(), "Switching to read-write failed."
AssertionError: Switching to read-write failed.
Related branches
- Aaron Bentley (community): Approve
-
Diff: 28 lines (+3/-1)1 file modifiedlib/lp/services/database/tests/test_readonly.py (+3/-1)
description: | updated |
Changed in launchpad: | |
assignee: | nobody → Benji York (benji) |
description: | updated |
tags: |
added: qa-untestable removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
Fixed in stable r14954 <http:// bazaar. launchpad. net/~launchpad- pqm/launchpad/ stable/ revision/ 14954>.