Closed
Bug 902560
Opened 11 years ago
Closed 11 years ago
All FakeProfileTestCase tests fail in setUp() if fake profile dir is not removed
Categories
(Android Background Services Graveyard :: Build & Test, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mcomella, Assigned: mcomella)
References
Details
Attachments
(1 file)
5.70 KB,
patch
|
mcomella
:
review+
|
Details | Diff | Splinter Review |
FakeProfileTestCase attempts to create a new fake profile directory in FakeProfileTestCase.setUp(). If mkdir() fails on this directory (e.g. the directory already exists), setUp() will throw an IllegalStateException. A call to tearDown() should delete the fake profile directory and alleviate this but if tearDown() is not called (e.g. process crash), all future tests will fail in setUp() on mkdir().
This is especially pertinent because tests that fail in setUp() don't get to call tearDown() and so this fake profile dir will exist even after the current integration test suite has finished running. Thus ALL future test runs will fail, even in subsequent runs, until this directory is deleted.
This could cause horrors with automated testing rigs so if we want to move these tests to tbpl, we should fix this (bug 709353).
I came across this by overriding tearDown and not calling super.tearDown() from a subclass, which is another way to come across this bug.
Comment 1•11 years ago
|
||
Should (a) use a computed random dir for this, and (b) blow it away in setUp if it exists, no?
Assignee | ||
Comment 2•11 years ago
|
||
Sounds ideal to me.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → michael.l.comella
Assignee | ||
Comment 3•11 years ago
|
||
We should use the changes in bug 870925 that add the FakeProfileTestCase.getCacheSuffix implementation.
Depends on: 870925
Assignee | ||
Comment 4•11 years ago
|
||
Flags: needinfo?(nalexander)
Assignee | ||
Comment 5•11 years ago
|
||
> We should use the changes in bug 870925 that add the FakeProfileTestCase.getCacheSuffix implementation.
This can land, and bug 870925 will add the randomization rnewman mentioned in comment 1 (a).
Assignee | ||
Updated•11 years ago
|
Status: NEW → ASSIGNED
Comment 7•11 years ago
|
||
Don't forget that tests/ stuff lands on m-c now.
Assignee | ||
Comment 8•11 years ago
|
||
Attachment #815633 -
Flags: review+
Assignee | ||
Comment 9•11 years ago
|
||
The randomness mentioned in comment 1 is helpful but not necessary to fix this bug.
This randomness will land in bug 870925.
No longer depends on: 870925
Whiteboard: [fixed-in-fx-team]
Comment 10•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
You need to log in
before you can comment on or make changes to this bug.
Description
•