Skip to content

Commit

Permalink
Fix TriggeredPublisher test (#2354)
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <[email protected]>
  • Loading branch information
azeey authored Apr 9, 2024
1 parent f8add56 commit 6505cf2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/integration/triggered_publisher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,16 @@ TEST_F(TriggeredPublisherTest,

std::string service = "/srv-test";
node.Advertise(service, srvEchoCb);
{
// This block of code is here because service requests from a previous test
// might interfere with this test. We sleep a small amount time and reset
// `recvCount` to 0. This ensures that the service requets from the previous
// test are discarded properly.
// TODO(azeey) Remove once
// https://github.com/gazebosim/gz-transport/issues/491 is resolved.
GZ_SLEEP_MS(2000);
recvCount = 0;
}

const std::size_t pubCount{10};
for (std::size_t i = 0; i < pubCount; ++i)
Expand Down

0 comments on commit 6505cf2

Please sign in to comment.