Skip to content

Commit

Permalink
Refs #20653: Add lease duration and increase deadline
Browse files Browse the repository at this point in the history
Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com>
  • Loading branch information
elianalf committed Apr 5, 2024
1 parent fc4cfa8 commit 29d8862
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions test/blackbox/common/DDSBlackboxTestsOwnershipQos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,11 @@ TEST_P(OwnershipQos, exclusive_kind_non_keyed_reliable_deadline)
PubSubWriter<HelloWorldPubSubType> writer1(TEST_TOPIC_NAME);
PubSubWriter<HelloWorldPubSubType> writer2(TEST_TOPIC_NAME);

reader.ownership_exclusive().reliability(RELIABLE_RELIABILITY_QOS).deadline_period({0, 100000000}).init();
writer1.ownership_strength(1).deadline_period({0, 100000000}).init();
writer2.ownership_strength(2).deadline_period({0, 100000000}).init();
reader.ownership_exclusive().reliability(RELIABLE_RELIABILITY_QOS).deadline_period({0, 500000000}).lease_duration(
{50, 0}, {3, 0}).init();
writer1.ownership_strength(1).deadline_period({0, 500000000}).lease_duration({50, 0}, {3, 0}).init();
writer2.ownership_strength(2).deadline_period({0, 500000000}).lease_duration({50, 0}, {3, 0}).init();


ASSERT_TRUE(reader.isInitialized());
ASSERT_TRUE(writer1.isInitialized());
Expand Down Expand Up @@ -748,7 +750,7 @@ TEST_P(OwnershipQos, exclusive_kind_non_keyed_reliable_deadline)
writer1.send_sample(data.front());
denied_samples.push_back(data.front());
data.pop_front();
std::this_thread::sleep_for(std::chrono::milliseconds(110));
std::this_thread::sleep_for(std::chrono::milliseconds(500));

writer1.send_sample(data.front());
data.pop_front();
Expand Down Expand Up @@ -778,9 +780,10 @@ TEST_P(OwnershipQos, exclusive_kind_keyed_reliable_deadline)
PubSubWriter<KeyedHelloWorldPubSubType> writer1(TEST_TOPIC_NAME);
PubSubWriter<KeyedHelloWorldPubSubType> writer2(TEST_TOPIC_NAME);

reader.ownership_exclusive().reliability(RELIABLE_RELIABILITY_QOS).deadline_period({0, 100000000}).init();
writer1.ownership_strength(1).deadline_period({0, 100000000}).init();
writer2.ownership_strength(2).deadline_period({0, 100000000}).init();
reader.ownership_exclusive().reliability(RELIABLE_RELIABILITY_QOS).deadline_period({0, 500000000}).lease_duration(
{50, 0}, {3, 0}).init();
writer1.ownership_strength(1).deadline_period({0, 500000000}).lease_duration({50, 0}, {3, 0}).init();
writer2.ownership_strength(2).deadline_period({0, 500000000}).lease_duration({50, 0}, {3, 0}).init();

ASSERT_TRUE(reader.isInitialized());
ASSERT_TRUE(writer1.isInitialized());
Expand Down Expand Up @@ -842,7 +845,7 @@ TEST_P(OwnershipQos, exclusive_kind_keyed_reliable_deadline)
writer1.send_sample(data.front());
denied_samples.push_back(data.front());
data.pop_front();
std::this_thread::sleep_for(std::chrono::milliseconds(110));
std::this_thread::sleep_for(std::chrono::milliseconds(500));

writer1.send_sample(data.front());
data.pop_front();
Expand All @@ -853,7 +856,7 @@ TEST_P(OwnershipQos, exclusive_kind_keyed_reliable_deadline)
writer1.send_sample(data.front());
denied_samples.push_back(data.front());
data.pop_front();
std::this_thread::sleep_for(std::chrono::milliseconds(110));
std::this_thread::sleep_for(std::chrono::milliseconds(500));

writer1.send_sample(data.front());
data.pop_front();
Expand All @@ -864,7 +867,7 @@ TEST_P(OwnershipQos, exclusive_kind_keyed_reliable_deadline)
writer1.send_sample(data.front());
denied_samples.push_back(data.front());
data.pop_front();
std::this_thread::sleep_for(std::chrono::milliseconds(110));
std::this_thread::sleep_for(std::chrono::milliseconds(500));

writer1.send_sample(data.front());
data.pop_front();
Expand Down

0 comments on commit 29d8862

Please sign in to comment.