Interference between TestTempestWorkspace and TestCallUntilTrue cause unit test job to randomly fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tempest |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Tempest unit test job fails if TestTempestWork
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "tempest/
File "tempest/
*args, **kwargs)
File "tempest/
func_name, time.time() - begin_time)
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
record = self.makeRecord
File "/usr/lib/
rv = LogRecord(name, level, fn, lno, msg, args, exc_info, func)
File "/usr/lib/
ct = time.time()
File "/opt/stack/
return _mock_self.
File "/opt/stack/
ret_val = effect(*args, **kwargs)
File "tempest/
return next(time_iterator)
StopIteration
The issue affects both py27 and py35 jobs.
Steps to reproduce:
-------------------
tox -epy35 -- --until-failure --serial tempest.
Note that this is localized repro, in the gate error has probabilistic nature.
Analysis:
---------
Success of tests from TestCallUntilTrue depends on log level. This is result of mocking time.time() certain number of times. Mocking does not take into account LOG.debug() statement, which adds one more call of time.time() (see http://
I have run below on my system but tests were passing without any failure or skipping.
tox -epy35 -- --until-failure --serial tempest. tests.cmd. test_workspace. TestTempestWork space.test_ run_workspace_ list TestCallUntilTrue
======
Totals
======
Ran: 24535 tests in 8655.8703 sec.
- Passed: 24535
- Skipped: 0
- Expected Fail: 0
- Unexpected Success: 0
- Failed: 0
Sum of execute time for each test: 3184.5269 sec.
==============
Worker Balance
==============
- Worker 0 (24535 tests) => 2:24:15.870346
Is this still occurring on your environment, if yes then could you please share more detail to reproduce it?