sick_ldmrs transport issue in python2.7

Bug #856901 reported by Brett Grandbois
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
CSIRO ASL ROS
Fix Released
High
Brett Grandbois

Bug Description

Getting strange 'restarting xport due to: socket.recv zero-length, likely a shutdown signal' messages from the driver when running under python2.7, which basically means when running on natty.

Changed in csiro-asl-ros-pkg:
assignee: nobody → Brett Grandbois (brett-grandbois)
Revision history for this message
Brett Grandbois (brett-grandbois) wrote :

It's a change in the threading.Event.wait() return code from 2.6-->2.7. Our test_msg handlers use Event.wait to signal the returned test message back from the node but the test assert is checking the return code being False, where as in 2.7 it will now be True on successful event. Changed the code to explicitly check the Event.isSet() as that should work the same in all versions. Tested ok in natty64 and lucid32.

Revision history for this message
Brett Grandbois (brett-grandbois) wrote :

=== modified file 'sick_ldmrs/test/test_msg.py'
--- sick_ldmrs/test/test_msg.py 2011-09-23 02:05:13 +0000
+++ sick_ldmrs/test/test_msg.py 2011-01-06 01:31:36 +0000
@@ -93,8 +93,7 @@
         self.get_msg()
         self.init_seq()
         self.send_ldmrs_msg()
- self.callback_event.wait(self.timeout)
- self.assertTrue(self.callback_event.isSet(),
+ self.assertFalse(self.callback_event.wait(self.timeout),
                 "Timeout waiting for cloud message")
         self.callback_event.clear()
         cloud.unregister()
@@ -117,8 +116,7 @@
         self.get_msg()
         self.init_seq()
         self.send_ldmrs_msg()
- self.callback_event.wait(self.timeout)
- self.assertTrue(self.callback_event.isSet(),
+ self.assertFalse(self.callback_event.wait(self.timeout),
                 "Timeout waiting for scan0 message")
         self.callback_event.clear()
         scan.unregister()
@@ -132,8 +130,7 @@
         self.get_msg()
         self.init_seq()
         self.send_ldmrs_msg()
- self.callback_event.wait(self.timeout)
- self.assertTrue(self.callback_event.isSet(),
+ self.assertFalse(self.callback_event.wait(self.timeout),
                 "Timeout waiting for scan1 message")
         self.callback_event.clear()
         scan.unregister()
@@ -147,8 +144,7 @@
         self.get_msg()
         self.init_seq()
         self.send_ldmrs_msg()
- self.callback_event.wait(self.timeout)
- self.assertTrue(self.callback_event.isSet(),
+ self.assertFalse(self.callback_event.wait(self.timeout),
                 "Timeout waiting for scan2 message")
         self.callback_event.clear()
         scan.unregister()
@@ -162,8 +158,7 @@
         self.get_msg()
         self.init_seq()
         self.send_ldmrs_msg()
- self.callback_event.wait(self.timeout)
- self.assertTrue(self.callback_event.isSet(),
+ self.assertFalse(self.callback_event.wait(self.timeout),
                 "Timeout waiting for scan3 message")
         self.callback_event.clear()
         scan.unregister()

Changed in csiro-asl-ros-pkg:
status: New → Fix Committed
Changed in csiro-asl-ros-pkg:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.