Keep polling in Packet{In,Out}Load until the switch quiesces,
otherwise a continuing flood of packet-in messages or data interferes
with subsequent tests
diff --git a/tests/load.py b/tests/load.py
index 0ad14e9..830aeed 100644
--- a/tests/load.py
+++ b/tests/load.py
@@ -129,10 +129,8 @@
for count in range(100):
out_count += 1
self.dataplane.send(of_port, str(pkt))
- time.sleep(2)
while True:
- (response, raw) = self.controller.poll(ofp.OFPT_PACKET_IN,
- timeout=0)
+ (response, raw) = self.controller.poll(ofp.OFPT_PACKET_IN)
if not response:
break
in_count += 1
@@ -185,9 +183,8 @@
exp_pkt_arg = None
exp_port = None
- time.sleep(2)
while True:
- (of_port, pkt, pkt_time) = self.dataplane.poll(timeout=0)
+ (of_port, pkt, pkt_time) = self.dataplane.poll()
if pkt is None:
break
in_count += 1