Add default timeout for do_barrier

And check the result do_barrier in all calls.
diff --git a/tests/pktact.py b/tests/pktact.py
index 724dcba..7b34d12 100644
--- a/tests/pktact.py
+++ b/tests/pktact.py
@@ -160,7 +160,7 @@
             pa_logger.info("Inserting flow")
             rv = self.controller.message_send(request)
             self.assertTrue(rv != -1, "Error installing flow mod")
-            do_barrier(self.controller)
+            self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             pa_logger.info("Sending packet to dp port " + 
                            str(ingress_port))
@@ -243,7 +243,7 @@
             pa_logger.info("Inserting flow")
             rv = self.controller.message_send(request)
             self.assertTrue(rv != -1, "Error installing flow mod")
-            do_barrier(self.controller)
+            self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             pa_logger.info("Sending packet to dp port " + 
                            str(ingress_port))
@@ -300,7 +300,7 @@
             pa_logger.info("Inserting flow")
             rv = self.controller.message_send(request)
             self.assertTrue(rv != -1, "Error installing flow mod")
-            do_barrier(self.controller)
+            self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             pa_logger.info("Sending packet to dp port " + str(ingress_port))
             self.dataplane.send(ingress_port, str(pkt))
@@ -355,7 +355,7 @@
             pa_logger.info("Inserting flow")
             rv = self.controller.message_send(request)
             self.assertTrue(rv != -1, "Error installing flow mod")
-            do_barrier(self.controller)
+            self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             pa_logger.info("Sending packet to dp port " + str(ingress_port))
             self.dataplane.send(ingress_port, str(pkt))
@@ -402,7 +402,7 @@
             pa_logger.info("Inserting flow")
             rv = self.controller.message_send(request)
             self.assertTrue(rv != -1, "Error installing flow mod")
-            do_barrier(self.controller)
+            self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             pa_logger.info("Sending packet to dp port " + str(ingress_port))
             self.dataplane.send(ingress_port, str(pkt))
@@ -454,7 +454,7 @@
             pa_logger.info("Inserting flow")
             rv = self.controller.message_send(request)
             self.assertTrue(rv != -1, "Error installing flow mod")
-            do_barrier(self.controller)
+            self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             pa_logger.info("Sending packet to dp port " + str(ingress_port))
             self.dataplane.send(ingress_port, str(pkt))
@@ -501,7 +501,7 @@
             pa_logger.info("Inserting flow")
             rv = self.controller.message_send(request)
             self.assertTrue(rv != -1, "Error installing flow mod")
-            do_barrier(self.controller)
+            self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             pa_logger.info("Sending packet to dp port " + str(ingress_port))
             self.dataplane.send(ingress_port, str(pkt))
@@ -553,7 +553,7 @@
             pa_logger.info("Inserting flow")
             rv = self.controller.message_send(request)
             self.assertTrue(rv != -1, "Error installing flow mod")
-            do_barrier(self.controller)
+            self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             pa_logger.info("Sending packet to dp port " + str(ingress_port))
             self.dataplane.send(ingress_port, str(pkt))
@@ -609,7 +609,7 @@
             pa_logger.info("Inserting flow")
             rv = self.controller.message_send(request)
             self.assertTrue(rv != -1, "Error installing flow mod")
-            do_barrier(self.controller)
+            self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             pa_logger.info("Sending packet to dp port " + str(ingress_port))
             pa_logger.info("No flood port is " + str(no_flood_port))
@@ -688,7 +688,7 @@
     def _ClearTable(self):
         rc = delete_all_flows(self.controller, self.logger)
         self.assertEqual(rc, 0, "Failed to delete all flows")
-        do_barrier(self.controller)
+        self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
     def runTest(self):
         
@@ -769,7 +769,7 @@
             # This *must* be set for DELETE
             msg.out_port = ofp.OFPP_NONE
             self.controller.message_send(msg)
-            do_barrier(self.controller)
+            self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
         else:
             raise Exception("Not initialized")
 
@@ -1257,7 +1257,7 @@
         for f_idx in range(flow_count):
             rv = self.controller.message_send(flows[0][f_idx])
             self.assertTrue(rv != -1, "Error installing flow %d" % f_idx)
-        do_barrier(self.controller)
+        self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
     
         pa_logger.info("Installed %d flows" % flow_count)
     
@@ -1279,7 +1279,8 @@
                     updates += 1
                     self.assertTrue(rv != -1, "Error modifying flow %d" % 
                                     f_idx)
-                do_barrier(self.controller)
+                self.assertEqual(do_barrier(self.controller), 0,
+                                 "Barrier failed")
 
         end = time.time()
         divisor = end - start or (end - start + 1)