Skip to content

Commit

Permalink
Refs #20291: Adjust payload_pool test
Browse files Browse the repository at this point in the history
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
  • Loading branch information
cferreiragonz committed Jun 13, 2024
1 parent ac0f539 commit 8a9eede
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/blackbox/common/DDSBlackboxTestsBasic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -797,9 +797,15 @@ TEST(DDSBasic, endpoint_custom_payload_pools)

std::this_thread::sleep_for(std::chrono::seconds(2));

// Two consecutive calls to get_payload are expected
// There are 4 calls to get_payload, two for the reader and two for the writer:
// 1. Reader:
// a. The first time the payload allocated in stack is processed (no payload_owner)
// b. Payload used to add the change in reception
ASSERT_EQ(reader_payload_pool->requested_payload_count, 2u);
ASSERT_EQ(writer_payload_pool->requested_payload_count, 1u);
// 2. Writer:
// a. Payload requested to the pool when creating the change
// b. Extra call using gather-send to avoid reusing the payload that contains the data before sending it
ASSERT_EQ(writer_payload_pool->requested_payload_count, 2u);

participant->delete_contained_entities();
}
Expand Down

0 comments on commit 8a9eede

Please sign in to comment.