Skip to content

Commit

Permalink
[jsk_topic_tools] Test ConnectionBasedTransport
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Oct 12, 2015
1 parent 6d1fc35 commit d72c654
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions jsk_topic_tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ if (NOT $ENV{ROS_DISTRO} STREQUAL "indigo")
add_rostest(test/test_hz_measure.test)
add_rostest(test/test_block.test)
add_rostest(test/test_connection_based_nodelet.test)
add_rostest(test/test_connection_based_transport.test)
endif(NOT $ENV{ROS_DISTRO} STREQUAL "indigo")

install(TARGETS topic_buffer_server topic_buffer_client jsk_topic_tools
Expand Down
22 changes: 22 additions & 0 deletions jsk_topic_tools/test/test_connection_based_transport.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<launch>
<node pkg="rostopic" type="rostopic" name="input"
args="pub /input sensor_msgs/Image 'data: [1, 2, 3]' -r 10">
</node>

<node name="simple_image_transport"
pkg="jsk_topic_tools" type="simple_image_transport.py">
<remap from="~input" to="input" />
</node>

<test test-name="test_connection"
name="test_connection"
pkg="jsk_topic_tools" type="test_connection.py">
<rosparam>
input_topic_type: sensor_msgs/Image
check_connected_topics: [simple_image_transport/output, input]
wait_for_connection: 3
</rosparam>
<remap from="~input" to="simple_image_transport/output" />
</test>

</launch>

0 comments on commit d72c654

Please sign in to comment.