[tests] when calling Client.shutdown(), SystemSettings plugins are not removed now, so tests require to call destroy() first, then shutdown()
This commit is contained in:
@@ -42,6 +42,11 @@ class EntropyRepositoryTest(unittest.TestCase):
|
||||
"""
|
||||
sys.stdout.write("%s ran\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
# calling destroy() and shutdown()
|
||||
# need to call destroy() directly to remove all the SystemSettings
|
||||
# plugins because shutdown() doesn't, since it's meant to be called
|
||||
# right before terminating the process
|
||||
self.Client.destroy()
|
||||
self.Client.shutdown()
|
||||
|
||||
def test_another_instance(self):
|
||||
|
||||
@@ -43,6 +43,11 @@ class EntropyRepositoryTest(unittest.TestCase):
|
||||
sys.stdout.flush()
|
||||
self.test_db.close()
|
||||
self.test_db2.close()
|
||||
# calling destroy() and shutdown()
|
||||
# need to call destroy() directly to remove all the SystemSettings
|
||||
# plugins because shutdown() doesn't, since it's meant to be called
|
||||
# right before terminating the process
|
||||
self.Client.destroy()
|
||||
self.Client.shutdown()
|
||||
|
||||
def __open_test_db(self, tmp_path):
|
||||
|
||||
@@ -39,6 +39,11 @@ class SecurityTest(unittest.TestCase):
|
||||
"""
|
||||
tearDown is run after each test
|
||||
"""
|
||||
# calling destroy() and shutdown()
|
||||
# need to call destroy() directly to remove all the SystemSettings
|
||||
# plugins because shutdown() doesn't, since it's meant to be called
|
||||
# right before terminating the process
|
||||
self._entropy.destroy()
|
||||
self._entropy.shutdown()
|
||||
del self._entropy
|
||||
del self._repository
|
||||
|
||||
@@ -36,6 +36,11 @@ class EntropyRepositoryTest(unittest.TestCase):
|
||||
"""
|
||||
sys.stdout.write("%s ran\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
# calling destroy() and shutdown()
|
||||
# need to call destroy() directly to remove all the SystemSettings
|
||||
# plugins because shutdown() doesn't, since it's meant to be called
|
||||
# right before terminating the process
|
||||
self.Server.destroy()
|
||||
self.Server.shutdown()
|
||||
|
||||
def test_server_instance(self):
|
||||
|
||||
@@ -28,6 +28,11 @@ class SpmTest(unittest.TestCase):
|
||||
"""
|
||||
sys.stdout.write("%s ran\n" % (self,))
|
||||
sys.stdout.flush()
|
||||
# calling destroy() and shutdown()
|
||||
# need to call destroy() directly to remove all the SystemSettings
|
||||
# plugins because shutdown() doesn't, since it's meant to be called
|
||||
# right before terminating the process
|
||||
self.Client.destroy()
|
||||
self.Client.shutdown()
|
||||
|
||||
def test_init(self):
|
||||
|
||||
@@ -49,6 +49,13 @@ class ToolsTest(unittest.TestCase):
|
||||
os.close(fd)
|
||||
os.remove(tmp_path)
|
||||
|
||||
# calling destroy() and shutdown()
|
||||
# need to call destroy() directly to remove all the SystemSettings
|
||||
# plugins because shutdown() doesn't, since it's meant to be called
|
||||
# right before terminating the process
|
||||
client.destroy()
|
||||
client.shutdown()
|
||||
|
||||
|
||||
def test_remove_entropy_metadata(self):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user