Add default timeout for do_barrier

And check the result do_barrier in all calls.
diff --git a/tests/flow_stats.py b/tests/flow_stats.py
index 4d43672..a959102 100644
--- a/tests/flow_stats.py
+++ b/tests/flow_stats.py
@@ -171,7 +171,7 @@
         fs_logger.info("Inserting flow")
         rv = self.controller.message_send(flow_mod_msg)
         self.assertTrue(rv != -1, "Error installing flow mod")
-        do_barrier(self.controller)
+        self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         # no packets sent, so zero packet count
         self.verifyStats(match, ofp.OFPP_NONE, test_timeout, 0)
@@ -298,7 +298,7 @@
         fs_logger.info("Inserting flow2")
         rv = self.controller.message_send(flow_mod_msg2)
         self.assertTrue(rv != -1, "Error installing flow mod")
-        do_barrier(self.controller)
+        self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         num_pkt1s = random.randint(10,30)
         fs_logger.info("Sending " + str(num_pkt1s) + " pkt1s")
@@ -414,7 +414,7 @@
         fs_logger.info("Inserting flow2")
         rv = self.controller.message_send(flow_mod_msg2)
         self.assertTrue(rv != -1, "Error installing flow mod")
-        do_barrier(self.controller)
+        self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         num_pkt1s = random.randint(10,30)
         fs_logger.info("Sending " + str(num_pkt1s) + " pkt1s")