throw AssertionError if controller.message_send fails
Unlike other types of exception an AssertionError will cause the test to "fail"
instead of "error". Using an exception instead of checking return values
removes a lot of boilerplate code that wasn't always present (or correct). It
may also help disabuse test writers of the dangerous notion that succeeding in
writing a message to the TCP socket means anything.
diff --git a/tests/flow_expire.py b/tests/flow_expire.py
index 93df5f8..705cab0 100644
--- a/tests/flow_expire.py
+++ b/tests/flow_expire.py
@@ -68,8 +68,7 @@
request.actions.add(act)
logging.info("Inserting flow")
- rv = self.controller.message_send(request)
- self.assertTrue(rv != -1, "Error installing flow mod")
+ self.controller.message_send(request)
self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
(response, pkt) = self.controller.poll(exp_msg=ofp.OFPT_FLOW_REMOVED,