summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGorka Eguileor <geguileo@redhat.com>2022-08-19 11:23:37 +0200
committerEric Harney <eharney@redhat.com>2022-09-21 16:57:53 -0400
commitfc9fd8a7ada48a1c2bc762b18814c1008b9f1df4 (patch)
treeb07eb382390710ed58d0b146b202efaec41960fe
parent1fa65ac7e28c4039dccf02e4c146d90891d7f2b1 (diff)
downloadcinder-fc9fd8a7ada48a1c2bc762b18814c1008b9f1df4.tar.gz
Tests: Fix service stopping on cleanup
Our services don't have a 'kill' method, they have a 'stop' method, so it doesn't make any sense to call the 'kill' method on them during test cleanup. This patch changes the 'kill' call with the right 'stop' call. Change-Id: Ib1bae260b8b5289e9a6c80baf2de9e908f977d09 (cherry picked from commit 1ef8e3ddc270ce87da4bac507b8760e19f4d43f2)
-rw-r--r--cinder/tests/unit/test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cinder/tests/unit/test.py b/cinder/tests/unit/test.py
index 21f2d1eb8..df9a3eebf 100644
--- a/cinder/tests/unit/test.py
+++ b/cinder/tests/unit/test.py
@@ -333,10 +333,10 @@ class TestCase(testtools.TestCase):
def _common_cleanup(self):
"""Runs after each test method to tear down test environment."""
- # Kill any services
+ # Stop any services (this stops RPC handlers)
for x in self._services:
try:
- x.kill()
+ x.stop()
except Exception:
pass