Skip to content

Commit

Permalink
iox-#27 Add test IDs for new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Jan 18, 2022
1 parent 3655a39 commit 2473871
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions iceoryx_posh/test/moduletests/test_popo_chunk_distributor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ TYPED_TEST(ChunkDistributor_test, RemoveAllQueuesWhenContainingMultipleQueues)

TYPED_TEST(ChunkDistributor_test, GetQueueIndexWithoutAddedQueueReturnsNoIndex)
{
::testing::Test::RecordProperty("TEST_ID", "92a9e4a8-3964-4d34-b144-10024914ab0d");
constexpr uint32_t UNKNOWN_QUEUE_INDEX{std::numeric_limits<uint32_t>::max()};

auto sutData = this->getChunkDistributorData();
Expand All @@ -262,6 +263,7 @@ TYPED_TEST(ChunkDistributor_test, GetQueueIndexWithoutAddedQueueReturnsNoIndex)

TYPED_TEST(ChunkDistributor_test, GetQueueIndexWithAddedQueueReturnsIndex)
{
::testing::Test::RecordProperty("TEST_ID", "31228aa0-d4b8-4f7d-98e4-ebdab8f0acd1");
constexpr uint32_t EXPECTED_QUEUE_INDEX{0U};

auto sutData = this->getChunkDistributorData();
Expand All @@ -277,6 +279,7 @@ TYPED_TEST(ChunkDistributor_test, GetQueueIndexWithAddedQueueReturnsIndex)

TYPED_TEST(ChunkDistributor_test, GetQueueIndexWithMultipleAddedQueuesReturnsIndex)
{
::testing::Test::RecordProperty("TEST_ID", "0183bea6-6189-437c-b15c-0d9ade511975");
constexpr uint32_t EXPECTED_QUEUE_INDEX_1{0U};
constexpr uint32_t EXPECTED_QUEUE_INDEX_2{1U};
constexpr uint32_t EXPECTED_QUEUE_INDEX_3{2U};
Expand Down Expand Up @@ -306,6 +309,7 @@ TYPED_TEST(ChunkDistributor_test, GetQueueIndexWithMultipleAddedQueuesReturnsInd

TYPED_TEST(ChunkDistributor_test, GetQueueIndexWithMultipleAddedQueuesAndUnknownLastIndexReturnsIndex)
{
::testing::Test::RecordProperty("TEST_ID", "3870dd6b-535c-497a-85cf-54709e2edd46");
constexpr uint32_t UNKNOWN_QUEUE_INDEX{std::numeric_limits<uint32_t>::max()};
constexpr uint32_t EXPECTED_QUEUE_INDEX_1{0U};
constexpr uint32_t EXPECTED_QUEUE_INDEX_2{1U};
Expand Down Expand Up @@ -336,6 +340,7 @@ TYPED_TEST(ChunkDistributor_test, GetQueueIndexWithMultipleAddedQueuesAndUnknown

TYPED_TEST(ChunkDistributor_test, GetQueueIndexWithPreviouslyAddedQueueRemovedReturnsNoIndex)
{
::testing::Test::RecordProperty("TEST_ID", "7680b79d-8e72-4441-8038-fa5a3fdfd182");
constexpr uint32_t EXPECTED_QUEUE_INDEX{0U};

auto sutData = this->getChunkDistributorData();
Expand Down
1 change: 1 addition & 0 deletions iceoryx_posh/test/moduletests/test_popo_chunk_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ TYPED_TEST(ChunkQueue_test, InitialConditionVariableAttached)

TYPED_TEST(ChunkQueue_test, UniqueIdIsMonotonicallyIncreasing)
{
::testing::Test::RecordProperty("TEST_ID", "e984db40-b43c-4a32-8fda-9618a1c1eecd");
using ChunkQueueData_t = typename ChunkQueue_test<TypeParam>::ChunkQueueData_t;

ChunkQueueData_t m_chunkData1{QueueFullPolicy::DISCARD_OLDEST_DATA, this->m_variantQueueType};
Expand Down
3 changes: 3 additions & 0 deletions iceoryx_posh/test/moduletests/test_popo_chunk_sender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ TEST_F(ChunkSender_test, sendInvalidChunk)

TEST_F(ChunkSender_test, sendToQueueWithoutReceiverReturnsFalse)
{
::testing::Test::RecordProperty("TEST_ID", "7139bfdc-3df9-4def-a292-407f8e650b34");
auto maybeChunkHeader = m_chunkSender.tryAllocate(
iox::UniquePortId(), sizeof(DummySample), alignof(DummySample), USER_HEADER_SIZE, USER_HEADER_ALIGNMENT);
ASSERT_FALSE(maybeChunkHeader.has_error());
Expand All @@ -461,6 +462,7 @@ TEST_F(ChunkSender_test, sendToQueueWithoutReceiverReturnsFalse)

TEST_F(ChunkSender_test, sendToQueueWithReceiverReturnsTrueAndDeliversSample)
{
::testing::Test::RecordProperty("TEST_ID", "1636bd5d-b2ad-495c-bacf-f505f51ae19b");
ASSERT_FALSE(m_chunkSender.tryAddQueue(&m_chunkQueueData).has_error());
iox::popo::ChunkQueuePopper<ChunkQueueData_t> queuePopper(&m_chunkQueueData);

Expand All @@ -485,6 +487,7 @@ TEST_F(ChunkSender_test, sendToQueueWithReceiverReturnsTrueAndDeliversSample)

TEST_F(ChunkSender_test, sendToQueueWithInvalidChunkTriggersTheErrorHandler)
{
::testing::Test::RecordProperty("TEST_ID", "5409c4f2-9b33-424c-aaa7-001d7c33e184");
auto maybeChunkHeader = m_chunkSender.tryAllocate(
iox::UniquePortId(), sizeof(DummySample), alignof(DummySample), USER_HEADER_SIZE, USER_HEADER_ALIGNMENT);
ASSERT_FALSE(maybeChunkHeader.has_error());
Expand Down
4 changes: 4 additions & 0 deletions iceoryx_posh/test/moduletests/test_popo_server_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ using namespace ::testing;

TEST(ServerOptions_test, SerializationRoundTripIsSuccessful)
{
::testing::Test::RecordProperty("TEST_ID", "888f49c2-0b70-4033-a13a-175dbc1b8e38");
iox::popo::ServerOptions defaultOptions;
iox::popo::ServerOptions testOptions;

Expand Down Expand Up @@ -51,6 +52,7 @@ TEST(ServerOptions_test, SerializationRoundTripIsSuccessful)

TEST(ServerOptions_test, DeserializingBogusDataFails)
{
::testing::Test::RecordProperty("TEST_ID", "ebc97c23-87df-484c-8c3c-1b76f1351997");
const auto bogusSerialization = iox::cxx::Serialization::create("hypnotoad", "brain slug", "rock star");
iox::popo::ServerOptions::deserialize(bogusSerialization)
.and_then([&](auto&) { FAIL() << "Deserialization is expected to fail!"; })
Expand All @@ -69,6 +71,7 @@ iox::cxx::Serialization enumSerialization(ConsumerTooSlowPolicyUT clientTooSlowP

TEST(ServerOptions_test, DeserializingValidClientTooSlowPolicyIsSuccessful)
{
::testing::Test::RecordProperty("TEST_ID", "95cd1efc-63c8-4eee-9f4e-ed105e653d71");
constexpr ConsumerTooSlowPolicyUT CLIENT_TOO_SLOW_POLICY{
static_cast<ConsumerTooSlowPolicyUT>(iox::popo::ConsumerTooSlowPolicy::WAIT_FOR_CONSUMER)};

Expand All @@ -80,6 +83,7 @@ TEST(ServerOptions_test, DeserializingValidClientTooSlowPolicyIsSuccessful)

TEST(ServerOptions_test, DeserializingInvalidClientTooSlowPolicyFails)
{
::testing::Test::RecordProperty("TEST_ID", "35b85d5a-7e59-4f0c-8afc-38f1eec914b8");
constexpr ConsumerTooSlowPolicyUT CLIENT_TOO_SLOW_POLICY{111};

const auto serialized = enumSerialization(CLIENT_TOO_SLOW_POLICY);
Expand Down

0 comments on commit 2473871

Please sign in to comment.