Merge pull request #596 from ros2/fix_wrong_use_of_constructor

fix wrong use of constructor and hanging test
This commit is contained in:
Dirk Thomas 2018-11-29 06:15:22 -08:00 committed by GitHub
commit 36262a5cf5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,6 +37,11 @@ protected:
rclcpp::init(0, nullptr);
}
static void TearDownTestCase()
{
rclcpp::shutdown();
}
void SetUp()
{
node = std::make_shared<rclcpp::Node>("my_node");
@ -348,14 +353,14 @@ TEST_F(TestTimeSource, parameter_activation) {
EXPECT_TRUE(ros_clock->ros_time_is_active());
set_use_sim_time_parameter(
node, rclcpp::ParameterValue(rclcpp::ParameterType::PARAMETER_NOT_SET));
node, rclcpp::ParameterValue());
EXPECT_TRUE(ros_clock->ros_time_is_active());
set_use_sim_time_parameter(node, rclcpp::ParameterValue(false));
EXPECT_FALSE(ros_clock->ros_time_is_active());
set_use_sim_time_parameter(
node, rclcpp::ParameterValue(rclcpp::ParameterType::PARAMETER_NOT_SET));
node, rclcpp::ParameterValue());
EXPECT_FALSE(ros_clock->ros_time_is_active());
// If the use_sim_time parameter is not explicitly set to True, this clock's use of sim time