When an unhandled Python error is raised in i9n tests, cleanup code becomes non-functional
Bug #1543541 reported by
Timur Sufiev
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Medium
|
Timur Sufiev |
Bug Description
What's worse, the call which should take a screenshot raises another exception (since Selenium is no longer responding after that unhandled error has been raised) which completely overwrites the original exception and traceback. And without original traceback it's very difficult to understand what caused integration test to fail.
affects: | python-novaclient → horizon |
Changed in horizon: | |
assignee: | nobody → Timur Sufiev (tsufiev-x) |
status: | New → In Progress |
Changed in horizon: | |
importance: | Undecided → Medium |
Changed in horizon: | |
milestone: | none → mitaka-3 |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/277755 /git.openstack. org/cgit/ openstack/ horizon/ commit/ ?id=51f35099bc0 be32e26012ace18 b1eb4502690349
Committed: https:/
Submitter: Jenkins
Branch: master
commit 51f35099bc0be32 e26012ace18b1eb 4502690349
Author: Timur Sufiev <email address hidden>
Date: Tue Feb 9 12:38:19 2016 +0300
Don't overwrite original traceback in certain cases of i9n failures
Achieve this by muffling exceptions (raised due to Selenium became not
resposive) while taking integration test failure screenshot.
Also extract the pattern of muffling and capturing exceptions common _captured context manager.
for dump_browser_log, dump_html_page and save_screenshot in a common
@exceptions
Closes-Bug: #1543541 b43529df056d2be acff70f6189
Change-Id: I37fa18a302c553