use default timeout in most cases
diff --git a/src/python/oftest/ofutils.py b/src/python/oftest/ofutils.py
index 3fd9df9..ce4e6ad 100644
--- a/src/python/oftest/ofutils.py
+++ b/src/python/oftest/ofutils.py
@@ -19,7 +19,7 @@
def timed_wait(cv, fn, timeout=-1):
if timeout == -1:
# TODO make this configurable
- timeout = 5
+ timeout = 2
end_time = time.time() + timeout
while True:
diff --git a/tests/basic.py b/tests/basic.py
index 5220b26..0b16f2f 100644
--- a/tests/basic.py
+++ b/tests/basic.py
@@ -294,8 +294,7 @@
basic_logger.info("BCast Leak Test, send to port %s" % d_port)
self.dataplane.send(d_port, str(pkt))
- (of_port, pkt_in, pkt_time) = self.dataplane.poll(timeout=2,
- exp_pkt=pkt)
+ (of_port, pkt_in, pkt_time) = self.dataplane.poll(exp_pkt=pkt)
self.assertTrue(pkt_in is None,
'BCast packet received on port ' + str(of_port))
@@ -341,8 +340,7 @@
if basic_config["relax"]:
exp_pkt_arg = outpkt
exp_port = dp_port
- (of_port, pkt, pkt_time) = self.dataplane.poll(timeout=1,
- port_number=exp_port,
+ (of_port, pkt, pkt_time) = self.dataplane.poll(port_number=exp_port,
exp_pkt=exp_pkt_arg)
self.assertTrue(pkt is not None, 'Packet not received')
@@ -417,7 +415,7 @@
request.out_port = ofp.OFPP_NONE
request.table_id = 0xff
request.match.wildcards = 0 # ofp.OFPFW_ALL
- response, pkt = self.controller.transact(request, timeout=2)
+ response, pkt = self.controller.transact(request)
self.assertTrue(response is not None, "Did not get response")
basic_logger.debug(response.show())
@@ -438,7 +436,7 @@
basic_logger.info("Sending table stats request")
request = message.table_stats_request()
- response, pkt = self.controller.transact(request, timeout=2)
+ response, pkt = self.controller.transact(request)
self.assertTrue(response is not None, "Did not get response")
basic_logger.debug(response.show())
@@ -453,7 +451,7 @@
basic_logger.info("Sending stats request")
request = message.desc_stats_request()
- response, pkt = self.controller.transact(request, timeout=2)
+ response, pkt = self.controller.transact(request)
self.assertTrue(response is not None, "Did not get response")
basic_logger.debug(response.show())
diff --git a/tests/caps.py b/tests/caps.py
index cf6c095..4657baa 100644
--- a/tests/caps.py
+++ b/tests/caps.py
@@ -102,7 +102,7 @@
flow_count += 1
if flow_count % count_check == 0:
obj.assertEqual(do_barrier(obj.controller), 0, "Barrier failed")
- response, pkt = obj.controller.transact(tstats, timeout=2)
+ response, pkt = obj.controller.transact(tstats)
obj.assertTrue(response is not None, "Get tab stats failed")
caps_logger.info(response.show())
if table_idx == -1: # Accumulate for all tables
diff --git a/tests/flow_query.py b/tests/flow_query.py
index 54c264f..f8b8fb2 100644
--- a/tests/flow_query.py
+++ b/tests/flow_query.py
@@ -1243,7 +1243,7 @@
def features_get(self):
# Get switch features
request = message.features_request()
- (self.sw_features, pkt) = self.controller.transact(request, timeout=2)
+ (self.sw_features, pkt) = self.controller.transact(request)
if self.sw_features is None:
fq_logger.error("Get switch features failed")
return False
@@ -1285,7 +1285,7 @@
def tbl_stats_get(self):
# Get table stats
request = message.table_stats_request()
- (self.tbl_stats, pkt) = self.controller.transact(request, timeout=2)
+ (self.tbl_stats, pkt) = self.controller.transact(request)
if self.tbl_stats is None:
fq_logger.error("Get table stats failed")
return False
@@ -1314,7 +1314,7 @@
request = message.queue_stats_request()
request.port_no = ofp.OFPP_ALL
request.queue_id = ofp.OFPQ_ALL
- (self.queue_stats, pkt) = self.controller.transact(request, timeout=2)
+ (self.queue_stats, pkt) = self.controller.transact(request)
if self.queue_stats is None:
fq_logger.error("Get queue stats failed")
return False
diff --git a/tests/flow_stats.py b/tests/flow_stats.py
index a959102..4e115aa 100644
--- a/tests/flow_stats.py
+++ b/tests/flow_stats.py
@@ -74,8 +74,7 @@
exp_pkt_arg = pkt
exp_port = egress_port
- (rcv_port, rcv_pkt, pkt_time) = obj.dataplane.poll(timeout=1,
- port_number=exp_port,
+ (rcv_port, rcv_pkt, pkt_time) = obj.dataplane.poll(port_number=exp_port,
exp_pkt=exp_pkt_arg)
obj.assertTrue(rcv_pkt is not None,
"Packet not received on port " + str(egress_port))
diff --git a/tests/pktact.py b/tests/pktact.py
index 7360b54..73ef8c4 100644
--- a/tests/pktact.py
+++ b/tests/pktact.py
@@ -172,8 +172,7 @@
exp_pkt_arg = pkt
exp_port = egress_port
- (rcv_port, rcv_pkt, pkt_time) = self.dataplane.poll(timeout=1,
- port_number=exp_port,
+ (rcv_port, rcv_pkt, pkt_time) = self.dataplane.poll(port_number=exp_port,
exp_pkt=exp_pkt_arg)
self.assertTrue(rcv_pkt is not None, "Did not receive packet")
pa_logger.debug("Packet len " + str(len(rcv_pkt)) + " in on " +
@@ -223,7 +222,7 @@
request = message.queue_stats_request()
request.port_no = ofp.OFPP_ALL
request.queue_id = ofp.OFPQ_ALL
- (queue_stats, p) = self.controller.transact(request, timeout=2)
+ (queue_stats, p) = self.controller.transact(request)
self.assertNotEqual(queue_stats, None, "Queue stats request failed")
act = action.action_enqueue()
@@ -261,7 +260,7 @@
request = message.queue_stats_request()
request.port_no = egress_port
request.queue_id = egress_queue_id
- (qs_before, p) = self.controller.transact(request, timeout=2)
+ (qs_before, p) = self.controller.transact(request)
self.assertNotEqual(qs_before, None, "Queue stats request failed")
pa_logger.info("Sending packet to dp port " +
@@ -274,8 +273,7 @@
exp_pkt_arg = pkt
exp_port = egress_port
- (rcv_port, rcv_pkt, pkt_time) = self.dataplane.poll(timeout=1,
- port_number=exp_port,
+ (rcv_port, rcv_pkt, pkt_time) = self.dataplane.poll(port_number=exp_port,
exp_pkt=exp_pkt_arg)
self.assertTrue(rcv_pkt is not None, "Did not receive packet")
pa_logger.debug("Packet len " + str(len(rcv_pkt)) + " in on " +
@@ -294,7 +292,7 @@
request = message.queue_stats_request()
request.port_no = egress_port
request.queue_id = egress_queue_id
- (qs_after, p) = self.controller.transact(request, timeout=2)
+ (qs_after, p) = self.controller.transact(request)
self.assertNotEqual(qs_after, None, "Queue stats request failed")
# Make sure that tx packet counter for selected egress queue was
@@ -348,7 +346,7 @@
request = message.queue_stats_request()
request.port_no = ofp.OFPP_CONTROLLER
request.queue_id = ofp.OFPQ_ALL
- (queue_stats, p) = self.controller.transact(request, timeout=2)
+ (queue_stats, p) = self.controller.transact(request)
self.assertNotEqual(queue_stats, None, "Queue stats request failed")
act = action.action_enqueue()
@@ -390,7 +388,7 @@
request = message.queue_stats_request()
request.port_no = egress_port
request.queue_id = egress_queue_id
- (qs_before, p) = self.controller.transact(request, timeout=2)
+ (qs_before, p) = self.controller.transact(request)
self.assertNotEqual(qs_before, None, "Queue stats request failed")
pa_logger.info("Sending packet to dp port " +
@@ -431,7 +429,7 @@
request = message.queue_stats_request()
request.port_no = egress_port
request.queue_id = egress_queue_id
- (qs_after, p) = self.controller.transact(request, timeout=2)
+ (qs_after, p) = self.controller.transact(request)
self.assertNotEqual(qs_after, None, "Queue stats request failed")
# Make sure that tx packet counter for selected egress queue was
@@ -1824,7 +1822,7 @@
global cached_supported_actions
if cached_supported_actions is None or not use_cache:
request = message.features_request()
- (reply, pkt) = parent.controller.transact(request, timeout=2)
+ (reply, pkt) = parent.controller.transact(request)
parent.assertTrue(reply is not None, "Did not get response to ftr req")
cached_supported_actions = reply.actions
pa_logger.info("Supported actions: " + hex(cached_supported_actions))
diff --git a/tests/serial_failover.py b/tests/serial_failover.py
index 8fb7064..600c50b 100644
--- a/tests/serial_failover.py
+++ b/tests/serial_failover.py
@@ -80,7 +80,7 @@
self.controller.start()
#@todo Add an option to wait for a pkt transaction to ensure version
# compatibilty?
- self.controller.connect(timeout=self.test_timeout)
+ self.controller.connect()
self.assertTrue(self.controller.active,
"Controller startup failed, not active")
self.assertTrue(self.controller.switch_addr is not None,
diff --git a/tests/testutils.py b/tests/testutils.py
index 68ee343..9b9940e 100644
--- a/tests/testutils.py
+++ b/tests/testutils.py
@@ -191,7 +191,7 @@
advertised values
"""
request = message.features_request()
- reply, pkt = controller.transact(request, timeout=2)
+ reply, pkt = controller.transact(request)
logger.debug(reply.show())
if reply is None:
logger.warn("Get feature request failed")
@@ -213,7 +213,7 @@
"""
logger.info("Setting port " + str(port_no) + " to config " + str(config))
request = message.features_request()
- reply, pkt = controller.transact(request, timeout=2)
+ reply, pkt = controller.transact(request)
if reply is None:
return -1
logger.debug(reply.show())
@@ -248,7 +248,7 @@
for ofport in yes_ports:
logger.debug("Checking for pkt on port " + str(ofport))
(rcv_port, rcv_pkt, pkt_time) = dp.poll(
- port_number=ofport, timeout=1, exp_pkt=exp_pkt_arg)
+ port_number=ofport, exp_pkt=exp_pkt_arg)
assert_if.assertTrue(rcv_pkt is not None,
"Did not receive pkt on " + str(ofport))
if not dataplane.match_exp_pkt(pkt, rcv_pkt):
@@ -288,7 +288,7 @@
if egr_port == ofp.OFPP_IN_PORT:
check_port = ing_port
(rcv_port, rcv_pkt, pkt_time) = parent.dataplane.poll(
- port_number=check_port, timeout=1, exp_pkt=exp_pkt_arg)
+ port_number=check_port, exp_pkt=exp_pkt_arg)
if rcv_pkt is None:
parent.logger.error("ERROR: No packet received from " +
@@ -808,7 +808,7 @@
rv = {}
- (reply, pkt) = parent.controller.transact(stat_req, timeout=2)
+ (reply, pkt) = parent.controller.transact(stat_req)
parent.assertTrue(len(reply.stats) == 1, "Did not receive flow stats reply")
for obj in reply.stats:
@@ -817,7 +817,7 @@
break
request = message.table_stats_request()
- (reply , pkt) = parent.controller.transact(request, timeout=2)
+ (reply , pkt) = parent.controller.transact(request)
(rv["active"], rv["lookups"], rv["matched"]) = (0,0,0)