summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHIYAMA Manabu <hiyama.manabu@po.ntts.co.jp>2013-02-15 13:55:38 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2013-02-15 16:58:14 +0900
commitc947e66fd1bd679199b238abf056828e7971c38b (patch)
treed8127123763486412f70270cb22ffd99bab42d92
parentf7eed1547c1ba1e73db35fb898a0b3ce402cfe16 (diff)
test: tuning integration test for OFPT_FLOW_REMOVED
tuning grace sec of tests for OFPT_FLOW_REMOVED. Sometimes, we will received the OFPT_FLOW_REMOVED message before rewirte the duration time of the ofp_flow_removed by the switch. Signed-off-by: HIYAMA Manabu <hiyama.manabu@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/tests/integrated/test_request_reply_v12.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ryu/tests/integrated/test_request_reply_v12.py b/ryu/tests/integrated/test_request_reply_v12.py
index 14aada4a..65f273bc 100644
--- a/ryu/tests/integrated/test_request_reply_v12.py
+++ b/ryu/tests/integrated/test_request_reply_v12.py
@@ -808,8 +808,8 @@ class RunTest(tester.TestFlowBase):
duration_nsec = (msg.duration_sec * 10 ** 9) + msg.duration_nsec
timeout_nsec = timeout * 10 ** 9
- # grace of 1.5 second to timeout.
- l = timeout * 10 ** 9
+ # grace of -0.5 and +1.5 second to timeout.
+ l = (timeout - 0.5) * 10 ** 9
h = (timeout + 1.5) * 10 ** 9
if not l < duration_nsec < h:
return 'bad duration time. set=%s(nsec), duration=%s(nsec)' \