Unit test is broken in stable/liberty
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Critical
|
Xing Yang | ||
Liberty |
Fix Released
|
Critical
|
Xing Yang |
Bug Description
stable/liberty unit tests are broken at the moment. The error can be seen in the following patch and a few other backport patches.
There is a call to LOG.exception in the except putils.
https:/
http://
2015-11-24 22:58:29.322 | cinder.
2015-11-24 22:58:29.322 | -------
2015-11-24 22:58:29.323 |
2015-11-24 22:58:29.323 | Captured traceback:
2015-11-24 22:58:29.323 | ~~~~~~~~~~~~~~~~~~~
2015-11-24 22:58:29.323 | Traceback (most recent call last):
2015-11-24 22:58:29.323 | File "/home/
2015-11-24 22:58:29.323 | return func(*args, **keywargs)
2015-11-24 22:58:29.323 | File "cinder/
2015-11-24 22:58:29.324 | self.fake_
2015-11-24 22:58:29.324 | File "/home/
2015-11-24 22:58:29.324 | self.assertThat
2015-11-24 22:58:29.324 | File "/home/
2015-11-24 22:58:29.324 | mismatch_error = self._matchHelp
2015-11-24 22:58:29.324 | File "/home/
2015-11-24 22:58:29.324 | mismatch = matcher.
2015-11-24 22:58:29.325 | File "/home/
2015-11-24 22:58:29.325 | mismatch = self.exception_
2015-11-24 22:58:29.325 | File "/home/
2015-11-24 22:58:29.325 | mismatch = matcher.
2015-11-24 22:58:29.325 | File "/home/
2015-11-24 22:58:29.325 | reraise(*matchee)
2015-11-24 22:58:29.325 | File "/home/
2015-11-24 22:58:29.326 | result = matchee()
2015-11-24 22:58:29.326 | File "/home/
2015-11-24 22:58:29.326 | return self._callable_
2015-11-24 22:58:29.326 | File "cinder/
2015-11-24 22:58:29.326 | self.update_
2015-11-24 22:58:29.326 | File "cinder/
2015-11-24 22:58:29.327 | {'conf': conf_file, 'vol_id': vol_id})
2015-11-24 22:58:29.327 | File "/usr/lib/
2015-11-24 22:58:29.327 | self.logger.
2015-11-24 22:58:29.327 | File "/usr/lib/
2015-11-24 22:58:29.327 | self._log(ERROR, msg, args, **kwargs)
2015-11-24 22:58:29.327 | File "/usr/lib/
2015-11-24 22:58:29.327 | self.handle(record)
2015-11-24 22:58:29.328 | File "/usr/lib/
2015-11-24 22:58:29.328 | self.callHandle
2015-11-24 22:58:29.328 | File "/usr/lib/
2015-11-24 22:58:29.328 | hdlr.handle(record)
2015-11-24 22:58:29.328 | File "/usr/lib/
2015-11-24 22:58:29.328 | self.emit(record)
2015-11-24 22:58:29.328 | File "/usr/lib/
2015-11-24 22:58:29.329 | self.handleErro
2015-11-24 22:58:29.329 | File "/usr/lib/
2015-11-24 22:58:29.329 | None, sys.stderr)
2015-11-24 22:58:29.329 | File "/usr/lib/
2015-11-24 22:58:29.329 | print_tb(tb, limit, file)
2015-11-24 22:58:29.329 | File "/usr/lib/
2015-11-24 22:58:29.330 | line = linecache.
2015-11-24 22:58:29.330 | File "/home/
2015-11-24 22:58:29.330 | lines = getlines(filename, module_globals)
2015-11-24 22:58:29.330 | File "/home/
2015-11-24 22:58:29.330 | return updatecache(
2015-11-24 22:58:29.330 | File "/home/
2015-11-24 22:58:29.413 | with open(fullname, 'rU') as fp:
2015-11-24 22:58:29.413 | File "/home/
2015-11-24 22:58:29.413 | return _mock_self.
2015-11-24 22:58:29.413 | File "/home/
2015-11-24 22:58:29.414 | raise effect
2015-11-24 22:58:29.414 | oslo_concurrenc
2015-11-24 22:58:29.414 | Command: None
2015-11-24 22:58:29.414 | Exit code: -
2015-11-24 22:58:29.414 | Stdout: None
2015-11-24 22:58:29.414 | Stderr: None
2015-11-24 22:58:29.414 |
2015-11-24 22:58:29.415 |
2015-11-24 22:58:29.415 | Captured stderr:
2015-11-24 22:58:29.415 | ~~~~~~~~~~~~~~~~
2015-11-24 22:58:29.415 | Traceback (most recent call last):
2015-11-24 22:58:29.415 | File "/usr/lib/
2015-11-24 22:58:29.415 |
2015-11-24 22:58:29.415 |
The fix is to mock the LOG in the unit test.
This problem is already fixed in the master as part of porting the test to py3.
https:/
Changed in cinder: | |
assignee: | nobody → Xing Yang (xing-yang) |
status: | New → In Progress |
description: | updated |
Changed in cinder: | |
importance: | Undecided → Critical |
Changed in cinder: | |
status: | In Progress → Fix Committed |
Changed in cinder: | |
status: | Fix Committed → Fix Released |
Fix proposed to branch: stable/liberty /review. openstack. org/250039
Review: https:/