Skip to content

Commit

Permalink
Refs #21357: Improve discovery server example test resilience
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
  • Loading branch information
Mario-DL committed Jul 18, 2024
1 parent 371555b commit 0807c03
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/cpp/discovery_server/ClientPublisherApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ ClientPublisherApp::ClientPublisherApp(
wqos.durability().kind = VOLATILE_DURABILITY_QOS;
}

// So as not to overwriter the first sample
// if we publish inmediately after the discovery
// and the suscription is not prepared yet
wqos.history().depth = 5;

writer_ = publisher_->create_datawriter(topic_, wqos, this);

if (writer_ == nullptr)
Expand Down

0 comments on commit 0807c03

Please sign in to comment.