Skip to content

Commit

Permalink
Fix windows issues
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Brawner <brawner@gmail.com>
  • Loading branch information
brawner committed Sep 17, 2020
1 parent 20b7fae commit 95462bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion rclcpp/test/rclcpp/wait_set_policies/test_static_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "rclcpp/rclcpp.hpp"
#include "rclcpp/wait_set.hpp"
#include "rclcpp/wait_set_policies/static_storage.hpp"
#include "../../utils/rclcpp_gtest_macros.hpp"

#include "test_msgs/msg/empty.hpp"
Expand Down Expand Up @@ -126,7 +127,8 @@ TEST_F(TestStaticStorage, wait_subscription) {
auto publisher = node->create_publisher<test_msgs::msg::Empty>("topic", 10);
auto subscription = node->create_subscription<test_msgs::msg::Empty>(
"topic", 10, [](test_msgs::msg::Empty::SharedPtr) {});
rclcpp::StaticWaitSet<1, 0, 0, 0, 0, 0> wait_set({{{subscription}}});
rclcpp::SubscriptionWaitSetMask mask{true, true, true};
rclcpp::StaticWaitSet<1, 0, 0, 0, 0, 0> wait_set({{{subscription, mask}}});

{
auto wait_result = wait_set.wait(std::chrono::milliseconds(10));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ TEST_F(TestThreadSafeStorage, add_remove_dynamically) {
std::runtime_error("waitable already in use by another wait set"));
wait_set.remove_waitable(waitable);
wait_set.prune_deleted_entities();

// Expected behavior of thread-safe is to timeout here
EXPECT_EQ(rclcpp::WaitResultKind::Timeout, wait_set.wait(std::chrono::milliseconds(10)).kind());
}
Expand Down

0 comments on commit 95462bf

Please sign in to comment.