Skip to content

Commit 2845e79

Browse files
LuciaEchevarria99juanlofer-eprosimairenebm
authored
Update repository for Fast DDS 3.0.0 compatibility (#455)
* Update repository for Fast DDS 3.0.0 compatibility Signed-off-by: Lucia Echevarria <luciaechevarria@eprosima.com> * Fix tests compilation Signed-off-by: Lucia Echevarria <luciaechevarria@eprosima.com> * Change DataWriter::write return value from bool to ReturnCode_t and fix tests Signed-off-by: Lucia Echevarria <luciaechevarria@eprosima.com> * Update compose tests Signed-off-by: Lucia Echevarria <luciaechevarria@eprosima.com> * Fix Docker tests Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com> * Change utils::ReturnCode format and update tests Signed-off-by: Lucia Echevarria <luciaechevarria@eprosima.com> * Refactor participants destructors to use delete_contained_entities() Signed-off-by: Irene Bandera <irenebandera@eprosima.com> * Make DiscoveryServer servers' guid prefix optional (#467) * Remove non-mandatory guid-prefix from discovery server blackbox tests Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com> * Raise YAML reader version Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com> * Remove non-required guid-prefix from DiscoveryServer Docker tests Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com> * Update documentation: version section Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com> * Update documentation and examples: guid-less discovery server Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com> * Update missing v4 -> v5 Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com> --------- Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com> * Update stress testing tests after rebase Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com> * Remove incorrect guid prefix tests for DiscoveryServerParticipant configuration Signed-off-by: Lucia Echevarria <luciaechevarria@eprosima.com> * Fix security tests Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com> --------- Signed-off-by: Lucia Echevarria <luciaechevarria@eprosima.com> Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com> Signed-off-by: Irene Bandera <irenebandera@eprosima.com> Co-authored-by: Juan Lopez Fernandez <juanlopez@eprosima.com> Co-authored-by: Irene Bandera <irenebandera@eprosima.com> Co-authored-by: juanlofer-eprosima <88179026+juanlofer-eprosima@users.noreply.github.com>
1 parent 1c89811 commit 2845e79

263 files changed

Lines changed: 1793 additions & 4518 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/docker/ddsrouter/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ RUN mkdir src && \
6262
cd src/dev-utils && git checkout ${devutils_branch} && cd ../.. && \
6363
cd src/ddspipe && git checkout ${ddspipe_branch} && cd ../.. && \
6464
cd src/ddsrouter && git checkout ${ddsrouter_branch} && cd ../.. && \
65-
cp -r src/fastdds/examples/cpp/dds/BasicConfigurationExample src/. && \
66-
cp -r src/fastdds/examples/cpp/dds/AdvancedConfigurationExample src/. && \
65+
cp -r src/fastdds/examples/cpp/configuration src/. && \
6766
colcon build --event-handlers console_direct+ --cmake-args -DLOG_INFO=ON -DSECURITY=ON
6867

6968
COPY run.bash /root/run.bash

ddsrouter_core/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ router.stop();
3838
3939
## Dependencies
4040
41-
* `fastrtps`
41+
* `fastdds`
4242
* `cpp_utils`
4343
4444
---

ddsrouter_core/project_settings.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ set(MODULE_SUMMARY
2424

2525
set(MODULE_FIND_PACKAGES
2626
fastcdr
27-
fastrtps
27+
fastdds
2828
cpp_utils
2929
ddspipe_core
3030
ddspipe_participants)
3131

32-
set(fastrtps_MINIMUM_VERSION "2.8")
32+
set(fastdds_MINIMUM_VERSION "3.0.0")
3333

3434
set(MODULE_DEPENDENCIES
3535
$<$<BOOL:${WIN32}>:iphlpapi$<SEMICOLON>Shlwapi>

ddsrouter_core/test/blackbox/ddsrouter_core/dds/WAN/CMakeLists.txt

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,14 @@
1919
set(TEST_NAME
2020
DDSTestWAN)
2121

22-
# Determine Fast DDS version
23-
if ("${fastrtps_VERSION}" VERSION_LESS 2.13)
24-
set(DDS_TYPES_VERSION "v1")
25-
else()
26-
set(DDS_TYPES_VERSION "v2")
27-
endif()
28-
2922
set(TEST_SOURCES
30-
DDSTestWAN.cpp
31-
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorld.cxx
32-
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldv1.cxx>
33-
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldCdrAux.ipp>
34-
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldPubSubTypes.cxx
35-
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyed.cxx
36-
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedv1.cxx>
37-
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedCdrAux.ipp>
38-
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedPubSubTypes.cxx)
23+
DDSTestWAN.cpp
24+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldPubSubTypes.cxx
25+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldCdrAux.ipp
26+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldTypeObjectSupport.cxx
27+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedPubSubTypes.cxx
28+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedCdrAux.ipp
29+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedTypeObjectSupport.cxx)
3930

4031
set(TEST_LIST
4132
end_to_end_discovery_server_WAN_communication_UDPv4
@@ -70,7 +61,7 @@ set(TEST_NEEDED_SOURCES
7061
)
7162

7263
set(TEST_EXTRA_HEADERS
73-
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld
64+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld
7465
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types)
7566

7667
add_blackbox_executable(

ddsrouter_core/test/blackbox/ddsrouter_core/dds/WAN/DDSTestWAN.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ discovery_server_participant_configuration(
103103
{
104104
conf.connection_addresses.insert(
105105
participants::types::DiscoveryServerConnectionAddress(
106-
core::types::GuidPrefix((this_server_id_is_1 ? 0u : 1u)),
107106
{
108107
participants::types::Address(
109108
(ip_version == participants::types::IpVersion::v4 ? "127.0.0.1" : "::1"),
@@ -130,8 +129,6 @@ discovery_server_participant_configuration(
130129

131130
conf.id = core::types::ParticipantId("WanDsParticipant_" + std::to_string((this_server_id_is_1 ? 1 : 0)));
132131

133-
conf.discovery_server_guid_prefix = core::types::GuidPrefix((this_server_id_is_1 ? 1u : 0u));
134-
135132
if (tls)
136133
{
137134
conf.tls_configuration = tls_configuration(wan_kind);

ddsrouter_core/test/blackbox/ddsrouter_core/dds/local/CMakeLists.txt

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,14 @@
1919
set(TEST_NAME
2020
DDSTestLocal)
2121

22-
# Determine Fast DDS version
23-
if ("${fastrtps_VERSION}" VERSION_LESS 2.13)
24-
set(DDS_TYPES_VERSION "v1")
25-
else()
26-
set(DDS_TYPES_VERSION "v2")
27-
endif()
28-
2922
set(TEST_SOURCES
3023
DDSTestLocal.cpp
31-
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorld.cxx
32-
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldv1.cxx>
33-
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldCdrAux.ipp>
34-
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldPubSubTypes.cxx
35-
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyed.cxx
36-
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedv1.cxx>
37-
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedCdrAux.ipp>
38-
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedPubSubTypes.cxx)
24+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldPubSubTypes.cxx
25+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldCdrAux.ipp
26+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldTypeObjectSupport.cxx
27+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedPubSubTypes.cxx
28+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedCdrAux.ipp
29+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedTypeObjectSupport.cxx)
3930

4031
set(TEST_LIST
4132
end_to_end_local_communication
@@ -52,8 +43,8 @@ set(TEST_NEEDED_SOURCES
5243
)
5344

5445
set(TEST_EXTRA_HEADERS
55-
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld
56-
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed,
46+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld
47+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed,
5748
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types)
5849

5950
add_blackbox_executable(
@@ -72,14 +63,12 @@ set(TEST_NAME
7263

7364
set(TEST_SOURCES
7465
DDSTestLocalDisposeKey.cpp
75-
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorld.cxx
76-
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldv1.cxx>
77-
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldCdrAux.ipp>
78-
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorld/HelloWorldPubSubTypes.cxx
79-
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyed.cxx
80-
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedv1.cxx>
81-
$<$<STREQUAL:${DDS_TYPES_VERSION},v2>:${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedCdrAux.ipp>
82-
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed/HelloWorldKeyedPubSubTypes.cxx)
66+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldPubSubTypes.cxx
67+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldCdrAux.ipp
68+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorld/HelloWorldTypeObjectSupport.cxx
69+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedPubSubTypes.cxx
70+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedCdrAux.ipp
71+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed/HelloWorldKeyedTypeObjectSupport.cxx)
8372

8473
set(TEST_LIST
8574
end_to_end_local_communication_key_dispose)
@@ -88,7 +77,7 @@ set(TEST_NEEDED_SOURCES
8877
)
8978

9079
set(TEST_EXTRA_HEADERS
91-
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/${DDS_TYPES_VERSION}/HelloWorldKeyed,
80+
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types/HelloWorldKeyed,
9281
${PROJECT_SOURCE_DIR}/test/blackbox/ddsrouter_core/dds/types)
9382

9483
add_blackbox_executable(

ddsrouter_core/test/blackbox/ddsrouter_core/dds/local/DDSTestLocal.cpp

Lines changed: 8 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,20 @@
1515
#include <atomic>
1616
#include <thread>
1717

18-
#include <cpp_utils/testing/gtest_aux.hpp>
19-
#include <gtest/gtest.h>
18+
#include <fastdds/dds/core/detail/DDSReturnCode.hpp>
2019

21-
#include <cpp_utils/testing/LogChecker.hpp>
2220
#include <cpp_utils/Log.hpp>
21+
#include <cpp_utils/testing/gtest_aux.hpp>
22+
#include <cpp_utils/testing/LogChecker.hpp>
2323

2424
#include <ddspipe_core/types/topic/filter/WildcardDdsFilterTopic.hpp>
2525

2626
#include <ddsrouter_core/core/DdsRouter.hpp>
2727

2828
#include <test_participants.hpp>
2929

30+
#include <gtest/gtest.h>
31+
3032
using namespace eprosima;
3133
using namespace eprosima::ddspipe;
3234
using namespace eprosima::ddsrouter::core;
@@ -111,11 +113,7 @@ DdsRouterConfiguration dds_test_simple_configuration(
111113
* The transient_local option changes the test behavior to verify that the communication is transient_local and all old data is sent
112114
* to Late Joiners.
113115
*/
114-
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
115-
template <class MsgStruct>
116-
#else
117116
template <class MsgStruct, class MsgStructType>
118-
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
119117
void test_local_communication(
120118
DdsRouterConfiguration ddsrouter_configuration,
121119
uint32_t samples_to_receive = DEFAULT_SAMPLES_TO_RECEIVE,
@@ -135,9 +133,7 @@ void test_local_communication(
135133
// Create a message with size specified by repeating the same string
136134
MsgStruct msg;
137135

138-
#if FASTRTPS_VERSION_MAJOR >= 2 && FASTRTPS_VERSION_MINOR >= 13
139136
MsgStructType type;
140-
#endif // if FASTRTPS_VERSION_MAJOR >= 2 && FASTRTPS_VERSION_MINOR >= 13
141137

142138
std::string msg_str;
143139

@@ -149,20 +145,12 @@ void test_local_communication(
149145
msg.message(msg_str);
150146

151147
// Create DDS Publisher in domain 0
152-
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
153-
TestPublisher<MsgStruct> publisher(msg.isKeyDefined());
154-
#else
155-
TestPublisher<MsgStruct> publisher(type.m_isGetKeyDefined);
156-
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
148+
TestPublisher<MsgStruct> publisher(type.is_compute_key_provided);
157149

158150
ASSERT_TRUE(publisher.init(0));
159151

160152
// Create DDS Subscriber in domain 1
161-
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
162-
TestSubscriber<MsgStruct> subscriber(msg.isKeyDefined(), transient_local);
163-
#else
164-
TestSubscriber<MsgStruct> subscriber(type.m_isGetKeyDefined, transient_local);
165-
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
153+
TestSubscriber<MsgStruct> subscriber(type.is_compute_key_provided, transient_local);
166154

167155
ASSERT_TRUE(subscriber.init(1, &msg, &samples_received));
168156

@@ -177,7 +165,7 @@ void test_local_communication(
177165
for (samples_sent = 0; samples_sent < samples_to_receive; samples_sent++)
178166
{
179167
msg.index(samples_sent);
180-
ASSERT_TRUE(publisher.publish(msg));
168+
ASSERT_EQ(publisher.publish(msg), eprosima::fastdds::dds::RETCODE_OK);
181169

182170
// If time is 0 do not wait
183171
if (time_between_samples > 0)
@@ -226,14 +214,8 @@ void test_local_communication(
226214
*/
227215
TEST(DDSTestLocal, end_to_end_local_communication)
228216
{
229-
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
230-
test::test_local_communication<HelloWorld>(
231-
test::dds_test_simple_configuration());
232-
#else
233217
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
234218
test::dds_test_simple_configuration());
235-
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
236-
237219
}
238220

239221
/**
@@ -242,13 +224,8 @@ TEST(DDSTestLocal, end_to_end_local_communication)
242224
*/
243225
TEST(DDSTestLocal, end_to_end_local_communication_keyed)
244226
{
245-
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
246-
test::test_local_communication<HelloWorldKeyed>(
247-
test::dds_test_simple_configuration());
248-
#else
249227
test::test_local_communication<HelloWorldKeyed, HelloWorldKeyedPubSubType>(
250228
test::dds_test_simple_configuration());
251-
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
252229
}
253230

254231
/**
@@ -258,24 +235,14 @@ TEST(DDSTestLocal, end_to_end_local_communication_keyed)
258235
*/
259236
TEST(DDSTestLocal, end_to_end_local_communication_disable_dynamic_discovery)
260237
{
261-
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
262-
test::test_local_communication<HelloWorld>(
263-
test::dds_test_simple_configuration(true));
264-
#else
265238
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
266239
test::dds_test_simple_configuration(true));
267-
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
268240
}
269241

270242
TEST(DDSTestLocal, end_to_end_local_communication_disable_dynamic_discovery_keyed)
271243
{
272-
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
273-
test::test_local_communication<HelloWorldKeyed>(
274-
test::dds_test_simple_configuration(true));
275-
#else
276244
test::test_local_communication<HelloWorldKeyed, HelloWorldKeyedPubSubType>(
277245
test::dds_test_simple_configuration(true));
278-
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
279246
}
280247

281248
/**
@@ -287,17 +254,10 @@ TEST(DDSTestLocal, end_to_end_local_communication_disable_dynamic_discovery_keye
287254
*/
288255
TEST(DDSTestLocal, end_to_end_local_communication_high_frequency)
289256
{
290-
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
291-
test::test_local_communication<HelloWorld>(
292-
test::dds_test_simple_configuration(),
293-
1000, // wait for 1000 samples received
294-
0); // send it without waiting from one sample to the other
295-
#else
296257
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
297258
test::dds_test_simple_configuration(),
298259
1000, // wait for 1000 samples received
299260
0); // send it without waiting from one sample to the other
300-
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
301261
}
302262

303263
/**
@@ -309,19 +269,11 @@ TEST(DDSTestLocal, end_to_end_local_communication_high_frequency)
309269
*/
310270
TEST(DDSTestLocal, end_to_end_local_communication_high_size)
311271
{
312-
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
313-
test::test_local_communication<HelloWorld>(
314-
test::dds_test_simple_configuration(),
315-
test::DEFAULT_SAMPLES_TO_RECEIVE,
316-
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
317-
10000); // 500K message size
318-
#else
319272
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
320273
test::dds_test_simple_configuration(),
321274
test::DEFAULT_SAMPLES_TO_RECEIVE,
322275
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
323276
10000); // 500K message size
324-
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
325277
}
326278

327279
/**
@@ -335,19 +287,11 @@ TEST(DDSTestLocal, end_to_end_local_communication_high_size)
335287
*/
336288
TEST(DDSTestLocal, end_to_end_local_communication_high_throughput)
337289
{
338-
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
339-
test::test_local_communication<HelloWorld>(
340-
test::dds_test_simple_configuration(),
341-
500,
342-
1,
343-
1000); // 50K message size
344-
#else
345290
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
346291
test::dds_test_simple_configuration(),
347292
500,
348293
1,
349294
1000); // 50K message size
350-
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
351295
}
352296

353297
/**
@@ -356,21 +300,12 @@ TEST(DDSTestLocal, end_to_end_local_communication_high_throughput)
356300
*/
357301
TEST(DDSTestLocal, end_to_end_local_communication_transient_local)
358302
{
359-
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
360-
test::test_local_communication<HelloWorld>(
361-
test::dds_test_simple_configuration(),
362-
test::DEFAULT_SAMPLES_TO_RECEIVE,
363-
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
364-
test::DEFAULT_MESSAGE_SIZE,
365-
true);
366-
#else
367303
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
368304
test::dds_test_simple_configuration(),
369305
test::DEFAULT_SAMPLES_TO_RECEIVE,
370306
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
371307
test::DEFAULT_MESSAGE_SIZE,
372308
true);
373-
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
374309
}
375310

376311
/**
@@ -379,21 +314,12 @@ TEST(DDSTestLocal, end_to_end_local_communication_transient_local)
379314
*/
380315
TEST(DDSTestLocal, end_to_end_local_communication_transient_local_disable_dynamic_discovery)
381316
{
382-
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
383-
test::test_local_communication<HelloWorld>(
384-
test::dds_test_simple_configuration(true, true),
385-
test::DEFAULT_SAMPLES_TO_RECEIVE,
386-
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
387-
test::DEFAULT_MESSAGE_SIZE,
388-
true);
389-
#else
390317
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
391318
test::dds_test_simple_configuration(true, true),
392319
test::DEFAULT_SAMPLES_TO_RECEIVE,
393320
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
394321
test::DEFAULT_MESSAGE_SIZE,
395322
true);
396-
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
397323
}
398324

399325
int main(

0 commit comments

Comments
 (0)