tests: Fix problems in "learning action - self-modifying flow" test.
authorBen Pfaff <blp@nicira.com>
Tue, 13 Aug 2013 18:22:26 +0000 (11:22 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 13 Aug 2013 18:22:54 +0000 (11:22 -0700)
commitb0ed42c8be975474c158b553471b706f979ad8cd
treed6ce48853b680652fb8f1a62d2e49764adbae237
parent70e575d980df7b272c51853204bf403551f8b200
tests: Fix problems in "learning action - self-modifying flow" test.

This test had two problems.  First, it had a bizarre dependency on stats
that were not up-to-date: the "ovs-ofctl dump-flows" assumed that only
the first one of ten packets sent through the switch had been accounted
to OpenFlow flow statistics.  Adding a 1-second time warp fixed this
problem by ensuring that all ten packets were accounted.  (That's why this
patch updates the expected output of "ovs-ofctl dump-flows".)

Second, multithreading has made packet processing less predictable in
general.  This commit adds 10-ms time warps after sending each packet,
which seems to make the test reliable for me.

Signed-off-by: Ben Pfaff <blp@nicira.com>
tests/learn.at