From 4345250b33421e53bf2c71bc4886b72cdb52e764 Mon Sep 17 00:00:00 2001 From: Naoto Hanaue Date: Tue, 15 Sep 2015 18:59:11 +0900 Subject: fix way for stop the quagga does not use a 'docker rm -f' command when stop the quagga --- test/scenario_test/lib/base.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/scenario_test/lib') diff --git a/test/scenario_test/lib/base.py b/test/scenario_test/lib/base.py index 9fc155c9..169b223c 100644 --- a/test/scenario_test/lib/base.py +++ b/test/scenario_test/lib/base.py @@ -155,7 +155,7 @@ class Container(object): self.eths = [] if self.docker_name() in get_containers(): - self.stop() + self.remove() def docker_name(self): if TEST_PREFIX == DEFAULT_TEST_PREFIX: @@ -179,6 +179,11 @@ class Container(object): return 0 def stop(self): + ret = try_several_times(lambda : local("docker stop -t 0 " + self.docker_name(), capture=True)) + self.is_running = False + return ret + + def remove(self): ret = try_several_times(lambda : local("docker rm -f " + self.docker_name(), capture=True)) self.is_running = False return ret -- cgit v1.2.3