Merge "Fix driver tests on Windows"
This commit is contained in:
commit
889f524660
|
@ -1067,6 +1067,15 @@ class PoisonFunctions(fixtures.Fixture):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(PoisonFunctions, self).setUp()
|
super(PoisonFunctions, self).setUp()
|
||||||
|
|
||||||
|
try:
|
||||||
|
self._poison_libvirt_driver()
|
||||||
|
except ImportError:
|
||||||
|
# The libvirt driver uses modules that are not available
|
||||||
|
# on Windows.
|
||||||
|
if os.name != 'nt':
|
||||||
|
raise
|
||||||
|
|
||||||
|
def _poison_libvirt_driver(self):
|
||||||
# The nova libvirt driver starts an event thread which only
|
# The nova libvirt driver starts an event thread which only
|
||||||
# causes trouble in tests. Make sure that if tests don't
|
# causes trouble in tests. Make sure that if tests don't
|
||||||
# properly patch it the test explodes.
|
# properly patch it the test explodes.
|
||||||
|
|
Loading…
Reference in New Issue