Skip to content

Commit

Permalink
delete param /hoge/param1 in test.
Browse files Browse the repository at this point in the history
assert use_sim_time param before create node
  • Loading branch information
OTL committed Jul 1, 2012
1 parent ea484a7 commit f8e33d8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/test_node.rb
Expand Up @@ -135,6 +135,7 @@ def test_param_private

node.set_param('~param2', 10)
assert_equal(10, node.get_param('/hoge/param2'))
assert(node.delete_param('~param1'))
assert(node.delete_param('~param2'))
node.shutdown
end
Expand Down Expand Up @@ -176,9 +177,7 @@ def test_sim_time
param = ROS::ParameterManager.new(ENV['ROS_MASTER_URI'], '/use_sim_time', {})
param.set_param('/use_sim_time', true)

while not param.get_param('/use_sim_time')
sleep 0.5
end
assert(param.get_param('/use_sim_time'))

clock_node = ROS::Node.new('/clock')
clock_pub = clock_node.advertise('/clock', Rosgraph_msgs::Clock)
Expand All @@ -196,6 +195,8 @@ def test_sim_time
assert_equal(time_msg.clock, sim_current)
param.delete_param('/use_sim_time')

assert(!param.get_param('/use_sim_time'))

ROS::Time.initialize_with_sim_or_wall(node)
node.shutdown
clock_node.shutdown
Expand Down

0 comments on commit f8e33d8

Please sign in to comment.