Merge lp://qastaging/~vila/selenium-simple-test/context-isolation into lp://qastaging/selenium-simple-test
Status: | Merged |
---|---|
Approved by: | Vincent Ladeuil |
Approved revision: | 392 |
Merged at revision: | 392 |
Proposed branch: | lp://qastaging/~vila/selenium-simple-test/context-isolation |
Merge into: | lp://qastaging/selenium-simple-test |
Prerequisite: | lp://qastaging/~vila/selenium-simple-test/even-less-flakes |
Diff against target: |
38 lines (+4/-2) 3 files modified
src/sst/config.py (+1/-1) src/sst/runtests.py (+2/-0) src/sst/tests/test_sst_run.py (+1/-1) |
To merge this branch: | bzr merge lp://qastaging/~vila/selenium-simple-test/context-isolation |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Corey Goldberg (community) | Approve | ||
Review via email:
|
Commit message
Fix test isolation regarding config/context.
Description of the change
While working on the pre-requisite branch, I encountered a weird issue: ./selftest.py was failing while ./ci.sh --unit wasn't.
The bug here is that populate_context was called without caring about cleaning after itself.
The root cause (90% sure haven't fully dug that one) is that nose provides better isolation by importing all modules in a clean (and test specific) sys.modules so each test is therefore isolated from side-effects involving module variables.
unittest on the other hand let the tests handle that kind of issues so ./selftest.py was failing.
I'm a bit worried that similar issues can exist and I think we should think about not using nose anymore.
In the mean time, this fix is better in than out ;)
lgtm