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)
