From c947e66fd1bd679199b238abf056828e7971c38b Mon Sep 17 00:00:00 2001 From: HIYAMA Manabu Date: Fri, 15 Feb 2013 13:55:38 +0900 Subject: [PATCH] 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 Signed-off-by: FUJITA Tomonori --- ryu/tests/integrated/test_request_reply_v12.py | 4 ++-- 1 file 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)' \