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 <[email protected]>
---
 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 14aada4..65f273b 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)' \
-- 
1.7.9.5



------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to