Skip to content

Commit e6295ee

Browse files
committed
iox-#2394 Fix discovery tests
1 parent 9c09be4 commit e6295ee

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

iceoryx_posh/test/integrationtests/test_service_discovery.cpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,19 +1002,19 @@ TYPED_TEST(ServiceDiscoveryFindService_test, FindInMaximumMixedServices)
10021002
{
10031003
::testing::Test::RecordProperty("TEST_ID", "e0b292c2-49ce-47b4-b38e-456732240c41");
10041004
// maximum number of producers to generate
1005-
auto constexpr MAX = TestFixture::maxProducers(TestFixture::Variation::PATTERN);
1005+
auto constexpr SUT_MAX = TestFixture::maxProducers(TestFixture::Variation::PATTERN);
10061006
// first threshold to change generation strategy at (about 1/3 of max)
1007-
auto constexpr N1 = MAX / 3;
1007+
auto constexpr SUT_N1 = SUT_MAX / 3;
10081008
// second threshold to change generation strategy at (about 2/3 of max)
1009-
auto constexpr N2 = 2 * N1;
1009+
auto constexpr SUT_N2 = 2 * SUT_N1;
10101010

10111011
// phase 1 : generate random services (no Umlaut)
10121012
auto s1 = randomService();
10131013
this->add(s1);
10141014

10151015
uint32_t created = 1;
10161016

1017-
for (; created < N1; ++created)
1017+
for (; created < SUT_N1; ++created)
10181018
{
10191019
this->add(randomService());
10201020
}
@@ -1025,13 +1025,13 @@ TYPED_TEST(ServiceDiscoveryFindService_test, FindInMaximumMixedServices)
10251025
++created;
10261026

10271027
// phase 2 : fix service, generate random instances (no Umlaut)
1028-
for (; created < N2; ++created)
1028+
for (; created < SUT_N2; ++created)
10291029
{
10301030
this->add(randomService("Ferdinand"));
10311031
}
10321032

10331033
// phase 3 : fix service and instance, generate random events (no Umlaut)
1034-
for (; created < MAX - 1; ++created)
1034+
for (; created < SUT_MAX - 1; ++created)
10351035
{
10361036
this->add(randomService("Ferdinand", "Spitz"));
10371037
}
@@ -1040,21 +1040,23 @@ TYPED_TEST(ServiceDiscoveryFindService_test, FindInMaximumMixedServices)
10401040
this->add(s3);
10411041
++created;
10421042

1043-
EXPECT_EQ(created, MAX);
1043+
EXPECT_EQ(created, SUT_MAX);
10441044

10451045
// create some services of the other kind
10461046
created = 0;
10471047

10481048
auto constexpr OTHER_MAX = TestFixture::maxProducers(TestFixture::otherPattern());
1049+
auto constexpr OTHER_N1 = OTHER_MAX / 3;
1050+
auto constexpr OTHER_N2 = 2 * OTHER_N1;
10491051

10501052
// same phases, but now for the other service type
10511053
// note that thresholds N1, N2 are chosen in a way that we can reuse them
1052-
for (; created < N1; ++created)
1054+
for (; created < OTHER_N1; ++created)
10531055
{
10541056
this->addOther(randomService());
10551057
}
10561058

1057-
for (; created < N2; ++created)
1059+
for (; created < OTHER_N2; ++created)
10581060
{
10591061
this->addOther(randomService("Spitz"));
10601062
}

0 commit comments

Comments
 (0)