Merge lp://qastaging/~vila/selenium-simple-test/context-isolation into lp://qastaging/selenium-simple-test

Proposed by Vincent Ladeuil
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
Reviewer Review Type Date Requested Status
Corey Goldberg (community) Approve
Review via email: mp+160333@code.qastaging.launchpad.net

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 ;)

To post a comment you must log in.
Revision history for this message
Corey Goldberg (coreygoldberg) wrote :

lgtm

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches