summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorNaoto Hanaue <hanaue.naoto@po.ntts.co.jp>2015-09-15 18:59:11 +0900
committerNaoto Hanaue <hanaue.naoto@po.ntts.co.jp>2015-09-15 19:29:42 +0900
commit4345250b33421e53bf2c71bc4886b72cdb52e764 (patch)
tree728a49548cab57465166638702e5c72afe538d0b /test
parenta4c673f96ab7f37b66b26081719504722bbf9754 (diff)
fix way for stop the quagga
does not use a 'docker rm -f' command when stop the quagga
Diffstat (limited to 'test')
-rw-r--r--test/scenario_test/lib/base.py7
1 files changed, 6 insertions, 1 deletions
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