@@ -1237,10 +1237,9 @@ TEST(ParticipantTests, ServerParticipantRemoteServerListConfiguration)
12371237}
12381238
12391239/* *
1240- * SERVER Participant with initial server with inconsistent GUID prefix.
1241- * Dynamic addition of servers failure.
1240+ * Dynamic modification of servers. Replacing previous servers with new ones.
12421241 */
1243- TEST (ParticipantTests, ServerParticipantInconsistentRemoteServerListConfiguration )
1242+ TEST (ParticipantTests, ServerParticipantReplaceRemoteServerListConfiguration )
12441243{
12451244 Log::ClearConsumers ();
12461245 MockConsumer* mockConsumer = new MockConsumer (" RTPS_QOS_CHECK" );
@@ -1257,9 +1256,6 @@ TEST(ParticipantTests, ServerParticipantInconsistentRemoteServerListConfiguratio
12571256 DomainParticipantQos qos;
12581257 rtps::LocatorList qos_output;
12591258 fastrtps::rtps::Locator_t locator;
1260- // Servers of the filename will overwrite the one set by QoS
1261- set_participant_qos (qos, qos_output);
1262- qos_output.clear ();
12631259 fastrtps::rtps::IPLocator::setIPv4 (locator, " 84.22.253.128" );
12641260 locator.port = 8888 ;
12651261 qos_output.push_back (locator);
@@ -1275,6 +1271,7 @@ TEST(ParticipantTests, ServerParticipantInconsistentRemoteServerListConfiguratio
12751271 DomainParticipant* participant = DomainParticipantFactory::get_instance ()->create_participant (
12761272 (uint32_t )GET_PID () % 230 , qos);
12771273 ASSERT_NE (nullptr , participant);
1274+ #ifndef __APPLE__
12781275 fastrtps::rtps::RTPSParticipantAttributes attributes;
12791276 get_rtps_attributes (participant, attributes);
12801277 EXPECT_EQ (attributes.builtin .discovery_config .discoveryProtocol , fastrtps::rtps::DiscoveryProtocol::SERVER );
@@ -1283,15 +1280,17 @@ TEST(ParticipantTests, ServerParticipantInconsistentRemoteServerListConfiguratio
12831280 // Modify environment file: fails cause the initial guid prefix did not comply with the schema
12841281 std::this_thread::sleep_for (std::chrono::milliseconds (100 ));
12851282 file.open (filename);
1286- file << " {\" ROS_DISCOVERY_SERVER\" : \" 84.22.253.128:8888; 192.168.1.133:64863;127.0.0.1:1234 \" }" ;
1283+ file << " {\" ROS_DISCOVERY_SERVER\" : \" 192.168.1.133:64863\" }" ;
12871284 file.close ();
12881285 fastrtps::rtps::IPLocator::setIPv4 (locator, " 192.168.1.133" );
12891286 locator.port = 64863 ;
1287+ qos_output.clear ();
12901288 qos_output.push_back (locator);
12911289
12921290 std::this_thread::sleep_for (std::chrono::milliseconds (100 ));
12931291 get_rtps_attributes (participant, attributes);
12941292 EXPECT_EQ (attributes.builtin .discovery_config .m_DiscoveryServers , qos_output);
1293+ #endif // APPLE
12951294 DomainParticipantQos result_qos = participant->get_qos ();
12961295 EXPECT_EQ (RETCODE_OK , participant->set_qos (result_qos));
12971296 EXPECT_EQ (RETCODE_OK , DomainParticipantFactory::get_instance ()->delete_participant (participant));
@@ -1392,14 +1391,14 @@ TEST(ParticipantTests, ServerParticipantCorrectRemoteServerListConfiguration)
13921391 DomainParticipant* participant = DomainParticipantFactory::get_instance ()->create_participant (
13931392 (uint32_t )GET_PID () % 230 , qos);
13941393 ASSERT_NE (nullptr , participant);
1394+ #ifndef __APPLE__
13951395 fastrtps::rtps::RTPSParticipantAttributes attributes;
13961396 get_rtps_attributes (participant, attributes);
13971397 EXPECT_EQ (attributes.builtin .discovery_config .m_DiscoveryServers , output);
13981398 // Add new server through environment file
13991399 // Even though the server added previously through the environment file is being pinged, it is not really being
14001400 // checked because it is not included in the attributes.
14011401 DomainParticipantQos result_qos;
1402- #ifndef __APPLE__
14031402 std::this_thread::sleep_for (std::chrono::milliseconds (100 ));
14041403 file.open (filename);
14051404 file << " {\" ROS_DISCOVERY_SERVER\" : \" 172.17.0.5:4321;;192.168.1.133:64863\" }" ;
0 commit comments