Stress Test - tearDown() not called if an exception occurred
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tempest |
Fix Released
|
Undecided
|
Julien Leloup |
Bug Description
The class "UnitTest" inside the Stress Test part of Tempest can call tearDownClass() either during it's own tearDown() or at the end of a run() execution, allowing the tearDownClass() to be called after each cycle of the stress test with the @stresstest decorator parameter "class_setup_per")
At the moment if an exception occurs during the run tearDownClass() is not called at the end of run() even if "class_setup_per" is set to "action" (no try / except block).
I propose to put a try / except block to in order to catch exception occuring in run_cycle(),and eventually call the tearDownClass() if relevent before raising the exception again.
If this behaviour (no tearDownClass() if there is an exception) should be left, maybe in order to leave OpenStack in a dirty state for debugging purposes, I propose to have a parameter set in tempest.conf called "leave_dirty_stack" with a default value set to False:
- True : tearDownClass() is not called upon exception in order to allow an operator/developper to have the stack in the exact state of the moment the error occured
- False : tearDownClass() is called upon exception in order to get OpenStack in the same state it was before running the test.
Note : this defect is slightly linked to this one "https:/
description: | updated |
description: | updated |
summary: |
- Stress Test - tearDown() not called if an exception occured + Stress Test - tearDown() not called if an exception occurred |
Changed in tempest: | |
status: | New → Confirmed |
Changed in tempest: | |
assignee: | nobody → Julien Leloup (julien-llp) |
Fix proposed to branch: master /review. openstack. org/69641
Review: https:/