commit 402ded572da14b8f810fed32e35fa715a664cefb
Author: Sean McGinnis <email address hidden>
Date: Fri Nov 17 14:56:03 2017 -0600
Remove ExceptionTestCase
Since the switch to stestr, it appears any tests that output a large
amount of logging can cause subparser errors. One of the tests that
seems to occasionally trigger this is in test_exceptions where it
loads all classes from cinder/exception.py and asserts that attempting
to raise the class results in it being raised.
Many of the exceptions require message formatting values passed in.
The base CinderException handles this, but it also logs when this is
the case. So looping through all the exceptions results in a lot of
log messages for these missing format values.
Since all this does is assert that raising the exception raises the
exception, there is little value to this test. Arguably the only thing
it does is enforce that non-exception classes can't be added to
exception.py as those would raise a TypeError rather than the expected
exception, but that does not seem like something we should care about
enforcing. At least not in a unit test.
Reviewed: https:/ /review. openstack. org/521192 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=402ded572da 14b8f810fed32e3 5fa715a664cefb
Committed: https:/
Submitter: Zuul
Branch: master
commit 402ded572da14b8 f810fed32e35fa7 15a664cefb
Author: Sean McGinnis <email address hidden>
Date: Fri Nov 17 14:56:03 2017 -0600
Remove ExceptionTestCase
Since the switch to stestr, it appears any tests that output a large
amount of logging can cause subparser errors. One of the tests that
seems to occasionally trigger this is in test_exceptions where it
loads all classes from cinder/exception.py and asserts that attempting
to raise the class results in it being raised.
Many of the exceptions require message formatting values passed in.
The base CinderException handles this, but it also logs when this is
the case. So looping through all the exceptions results in a lot of
log messages for these missing format values.
Since all this does is assert that raising the exception raises the
exception, there is little value to this test. Arguably the only thing
it does is enforce that non-exception classes can't be added to
exception.py as those would raise a TypeError rather than the expected
exception, but that does not seem like something we should care about
enforcing. At least not in a unit test.
Change-Id: I56c37bb2f5fa20 356341e57367451 17806463644
Partial-bug: #1728640