Skip to content

Commit

Permalink
add timestamp of topic in test
Browse files Browse the repository at this point in the history
Signed-off-by: MasatoSaeki <[email protected]>
  • Loading branch information
MasatoSaeki committed Dec 24, 2024
1 parent 982643f commit e2916dd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions perception/autoware_traffic_light_arbiter/test/test_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ TEST(TrafficLightArbiterTest, testTrafficSignalOnlyPerceptionMsg)
};
test_manager->set_subscriber<TrafficSignalArray>(output_topic, callback);

// stamp preparation
perception_msg.stamp = test_target_node->now();

test_manager->test_pub_msg<LaneletMapBin>(
test_target_node, input_map_topic, vector_map_msg, rclcpp::QoS(1).transient_local());
test_manager->test_pub_msg<TrafficSignalArray>(
Expand Down Expand Up @@ -229,6 +232,9 @@ TEST(TrafficLightArbiterTest, testTrafficSignalOnlyExternalMsg)
};
test_manager->set_subscriber<TrafficSignalArray>(output_topic, callback);

// stamp preparation
external_msg.stamp = test_target_node->now();

test_manager->test_pub_msg<LaneletMapBin>(
test_target_node, input_map_topic, vector_map_msg, rclcpp::QoS(1).transient_local());
test_manager->test_pub_msg<TrafficSignalArray>(
Expand Down Expand Up @@ -268,6 +274,10 @@ TEST(TrafficLightArbiterTest, testTrafficSignalBothMsg)
};
test_manager->set_subscriber<TrafficSignalArray>(output_topic, callback);

// stamp preparation
external_msg.stamp = test_target_node->now();
perception_msg.stamp = test_target_node->now();

test_manager->test_pub_msg<LaneletMapBin>(
test_target_node, input_map_topic, vector_map_msg, rclcpp::QoS(1).transient_local());
test_manager->test_pub_msg<TrafficSignalArray>(
Expand Down

0 comments on commit e2916dd

Please sign in to comment.