summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-07-03 12:47:40 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-07-03 12:47:40 +0900
commitb37dff1ff97beadc6cd842b7e9f742da02fec7b5 (patch)
tree85e7da96ca4737ef2aac814e5db6627893b0e44d /test/scenario_test
parentb02f24e01213a19b92ebd96b703e0240fdf8d3ff (diff)
test: stretch timeout
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test/scenario_test')
-rw-r--r--test/scenario_test/bgp_router_test.py4
-rw-r--r--test/scenario_test/lib/base.py2
-rw-r--r--test/scenario_test/lib/gobgp.py4
3 files changed, 7 insertions, 3 deletions
diff --git a/test/scenario_test/bgp_router_test.py b/test/scenario_test/bgp_router_test.py
index 8b17e380..5d71ff85 100644
--- a/test/scenario_test/bgp_router_test.py
+++ b/test/scenario_test/bgp_router_test.py
@@ -90,6 +90,8 @@ class GoBGPTestBase(unittest.TestCase):
cmd = 'docker exec {0} {1}' \
' monitor global rib -j'.format(self.gobgp.name, gobgp)
+ print '[localhost] local:', cmd
+
process = subprocess.Popen(cmd, shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
@@ -97,7 +99,7 @@ class GoBGPTestBase(unittest.TestCase):
poll = select.epoll()
poll.register(process.stdout, select.POLLIN)
- timeout = 10.0
+ timeout = 120.0
while True:
result = poll.poll(timeout)
diff --git a/test/scenario_test/lib/base.py b/test/scenario_test/lib/base.py
index 5dec078f..66e610d9 100644
--- a/test/scenario_test/lib/base.py
+++ b/test/scenario_test/lib/base.py
@@ -259,7 +259,7 @@ class BGPContainer(Container):
def get_neighbor_state(self, peer_id):
raise Exception('implement get_neighbor() method')
- def wait_for(self, expected_state, peer, timeout=10):
+ def wait_for(self, expected_state, peer, timeout=120):
interval = 1
count = 0
while True:
diff --git a/test/scenario_test/lib/gobgp.py b/test/scenario_test/lib/gobgp.py
index 3b7ec5ba..1bfcf5fe 100644
--- a/test/scenario_test/lib/gobgp.py
+++ b/test/scenario_test/lib/gobgp.py
@@ -124,7 +124,7 @@ class GoBGPContainer(BGPContainer):
output = local(cmd, capture=True)
return json.loads(output)['info']['bgp_state']
- def wait_for(self, expected_state, peer, timeout=20):
+ def wait_for(self, expected_state, peer, timeout=120):
state = self.get_neighbor_state(peer)
y = colors.yellow
print y("{0}'s peer {1} state: {2}".format(self.router_id,
@@ -142,6 +142,8 @@ class GoBGPContainer(BGPContainer):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
+ print '[localhost] local:', cmd
+
poll = select.epoll()
poll.register(process.stdout, select.POLLIN)