Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky PC commands test #120

Merged
merged 2 commits into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions buoy_tests/tests/fixture_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ TEST(BuoyTests, RunServer)
response->success = true;
return;
} else {
RCLCPP_INFO_STREAM(
RCLCPP_DEBUG_STREAM(
rclcpp::get_logger("run_server"),
"Incoming request\niterations: " << request->iterations);
}
Expand All @@ -123,7 +123,7 @@ TEST(BuoyTests, RunServer)

EXPECT_EQ(iterations - initial_iterations, request->iterations);

RCLCPP_INFO_STREAM(
RCLCPP_DEBUG_STREAM(
rclcpp::get_logger("run_server"),
"Response: " << std::boolalpha << response->success << std::noboolalpha);
}
Expand Down
8 changes: 4 additions & 4 deletions buoy_tests/tests/pc_commands_ros_feedback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ TEST_F(BuoyPCTests, PCCommandsInROSFeedback)

// Now send wind curr command
node->pc_wind_curr_response_future_ = node->send_pc_wind_curr_command(wc);
ASSERT_TRUE(node->pc_wind_curr_response_future_.valid());
EXPECT_TRUE(node->pc_wind_curr_response_future_.valid()) << "Winding Current future invalid!";
node->pc_wind_curr_response_future_.wait();
EXPECT_EQ(
node->pc_wind_curr_response_future_.get()->result.value,
Expand All @@ -334,7 +334,7 @@ TEST_F(BuoyPCTests, PCCommandsInROSFeedback)

// Now send scale command
node->pc_scale_response_future_ = node->send_pc_scale_command(scale);
ASSERT_TRUE(node->pc_scale_response_future_.valid());
EXPECT_TRUE(node->pc_scale_response_future_.valid()) << "Scale future invalid!";
node->pc_scale_response_future_.wait();
EXPECT_EQ(
node->pc_scale_response_future_.get()->result.value,
Expand All @@ -359,7 +359,7 @@ TEST_F(BuoyPCTests, PCCommandsInROSFeedback)

// Now send retract command
node->pc_retract_response_future_ = node->send_pc_retract_command(retract);
ASSERT_TRUE(node->pc_retract_response_future_.valid());
EXPECT_TRUE(node->pc_retract_response_future_.valid()) << "Retract future invalid!";
node->pc_retract_response_future_.wait();
EXPECT_EQ(
node->pc_retract_response_future_.get()->result.value,
Expand Down Expand Up @@ -408,7 +408,7 @@ TEST_F(BuoyPCTests, PCCommandsInROSFeedback)

// Now send bias curr command
node->pc_bias_curr_response_future_ = node->send_pc_bias_curr_command(bc);
ASSERT_TRUE(node->pc_bias_curr_response_future_.valid());
EXPECT_TRUE(node->pc_bias_curr_response_future_.valid()) << "Bias Current future invalid!";
node->pc_bias_curr_response_future_.wait();
EXPECT_EQ(
node->pc_bias_curr_response_future_.get()->result.value,
Expand Down