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>
This commit is contained in:
HIYAMA Manabu 2013-02-15 13:55:38 +09:00 committed by FUJITA Tomonori
parent f7eed1547c
commit c947e66fd1

View File

@ -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)' \