Misleading error message on migrate number conflict when running unit tests

Bug #798714 reported by Lorin Hochstein
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Lorin Hochstein

Bug Description

If two files in the nova/db/sqlalchemy/migrate_repo/versions directory have the same number, then run_tests.sh will not produce any output, and the run_tests.log file will have a misleading error message.

To reproduce:

$ touch nova/db/sqlalchemy/migrate_repo/versions/23_foo.py
$ ./run_tests.sh

No output will appear on standard out, and run_tests.log will contain the following:

2011-06-17 09:56:04,385 CRITICAL nova [-] 'NovaTestResult' object has no attribute 'start_time'
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "run_tests.py", line 358, in <module>
(nova): TRACE: sys.exit(not core.run(config=c, testRunner=runner, argv=argv))
(nova): TRACE: File "/Users/lorin/nova/trunk/.nova-venv/lib/python2.6/site-packages/nose/core.py", line 283, in run
(nova): TRACE: return TestProgram(*arg, **kw).success
(nova): TRACE: File "/Users/lorin/nova/trunk/.nova-venv/lib/python2.6/site-packages/nose/core.py", line 118, in __init__
(nova): TRACE: **extra_args)
(nova): TRACE: File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", line 817, in __init__
(nova): TRACE: self.runTests()
(nova): TRACE: File "/Users/lorin/nova/trunk/.nova-venv/lib/python2.6/site-packages/nose/core.py", line 197, in runTests
(nova): TRACE: result = self.testRunner.run(self.test)
(nova): TRACE: File "run_tests.py", line 327, in run
(nova): TRACE: result_ = core.TextTestRunner.run(self, test)
(nova): TRACE: File "/Users/lorin/nova/trunk/.nova-venv/lib/python2.6/site-packages/nose/core.py", line 61, in run
(nova): TRACE: test(result)
(nova): TRACE: File "/Users/lorin/nova/trunk/.nova-venv/lib/python2.6/site-packages/nose/suite.py", line 176, in __call__
(nova): TRACE: return self.run(*arg, **kw)
(nova): TRACE: File "/Users/lorin/nova/trunk/.nova-venv/lib/python2.6/site-packages/nose/suite.py", line 213, in run
(nova): TRACE: result.addError(self, self._exc_info())
(nova): TRACE: File "/Users/lorin/nova/trunk/.nova-venv/lib/python2.6/site-packages/nose/proxy.py", line 125, in addError
(nova): TRACE: self.result.addError(self.test, err)
(nova): TRACE: File "run_tests.py", line 258, in addError
(nova): TRACE: self._handleElapsedTime(test)
(nova): TRACE: File "run_tests.py", line 218, in _handleElapsedTime
(nova): TRACE: self.elapsed_time = time.time() - self.start_time
(nova): TRACE: AttributeError: 'NovaTestResult' object has no attribute 'start_time'

(This is revision 1188).

Related branches

Thierry Carrez (ttx)
Changed in nova:
assignee: nobody → Lorin Hochstein (lorinh)
importance: Undecided → Low
status: New → In Progress
Thierry Carrez (ttx)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-2
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-2 → 2011.3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.