Skip to content

Commit

Permalink
Use wait_for_entity helpers from #631.
Browse files Browse the repository at this point in the history
Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>
  • Loading branch information
nuclearsandwich committed May 15, 2020
1 parent c1f580e commit 50a5530
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions rcl/test/rcl/test_info_by_topic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,31 +362,6 @@ TEST_F(
ASSERT_EQ(ret, RCL_RET_OK) << rcl_get_error_string().str;
const std::string fqdn = std::string("/") + this->topic_name;
ASSERT_TRUE(wait_for_established_subscription(&publisher, 10, 100));
//size_t max_tries = 10;
//size_t iteration = 0;
//size_t publisher_count = 0;
//do {
// ret = rcl_count_publishers(&this->node, fqdn.c_str(), &publisher_count);
// if (publisher_count >= 1) {
// break;
// }
// ++iteration;
// std::this_thread::sleep_for(std::chrono::milliseconds(100));
//} while (iteration < max_tries || publisher_count < 1);
// ASSERT_EQ(publisher_count, 1u) << "Unexpected publisher count";
//max_tries = 10;
//iteration = 0;
//size_t subscriber_count = 0;
//do {
// ret = rcl_count_subscribers(&this->node, fqdn.c_str(), &subscriber_count);
// if (subscriber_count >= 1) {
// break;
// }
// ++iteration;
// std::this_thread::sleep_for(std::chrono::milliseconds(100));
//} while (iteration < max_tries);
// ASSERT_EQ(subscriber_count, 1u) << "Unexpected subscriber count";
//ASSERT_EQ(ret, RCL_RET_OK) << rcl_get_error_string().str;
ASSERT_TRUE(wait_for_subscription_to_be_ready(&subscription, &this->context, 10, 100));
// Get publishers info by topic
rmw_topic_endpoint_info_array_t topic_endpoint_info_array_pub =
Expand Down

0 comments on commit 50a5530

Please sign in to comment.