Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
  • Loading branch information
richiware and MiguelCompany authored Jul 23, 2021
1 parent d852997 commit 68a7465
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/blackbox/common/BlackboxTestsPubSubHistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,8 @@ class PubSubHistory : public testing::TestWithParam<test_params>
switch (mem_policy_)
{
case rtps::PREALLOCATED_MEMORY_MODE:
will_use_datasharing = true;
break;
case rtps::PREALLOCATED_WITH_REALLOC_MEMORY_MODE:
will_use_datasharing = true;
will_use_datasharing = enable_datasharing;
break;
default:
break;
Expand Down Expand Up @@ -1204,7 +1202,7 @@ TEST_P(PubSubHistory, KeepAllWriterContinueSendingAfterReaderMatched)
data.index(2u);
uint32_t expected_value = data.index();

if (enable_datasharing && will_use_datasharing)
if (will_use_datasharing)
{
if (reader.wait_for_all_received(std::chrono::seconds(3), 1))
{
Expand All @@ -1221,7 +1219,7 @@ TEST_P(PubSubHistory, KeepAllWriterContinueSendingAfterReaderMatched)
ASSERT_TRUE(writer.send_sample(data));
}

if (enable_datasharing && will_use_datasharing)
if (will_use_datasharing)
{
reader.wait_for_all_received(std::chrono::seconds(3), expected_value);
}
Expand Down

0 comments on commit 68a7465

Please sign in to comment.