diff --git a/src/DSManager.cpp b/src/DSManager.cpp index 6581af7d..80725a5c 100644 --- a/src/DSManager.cpp +++ b/src/DSManager.cpp @@ -1025,14 +1025,14 @@ void DiscoveryServerManager::loadServer( tinyxml2::XMLElement* pub = server->FirstChildElement(DSxmlparser::PUBLISHER); while (pub != nullptr) { - loadPublisher(guid, pub); + loadPublisher(guid, pub, &event); pub = pub->NextSiblingElement(DSxmlparser::PUBLISHER); } tinyxml2::XMLElement* sub = server->FirstChildElement(DSxmlparser::SUBSCRIBER); while (sub != nullptr) { - loadSubscriber(guid, sub); + loadSubscriber(guid, sub, &event); sub = sub->NextSiblingElement(DSxmlparser::SUBSCRIBER); } } @@ -1735,6 +1735,10 @@ void DiscoveryServerManager::loadEnvironmentChange( return; } const char* value = change->GetText(); + if (nullptr == value) + { + value = ""; + } // Add the event events.push_back(new DelayedEnvironmentModification(time, key, value)); diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0fbdeb6b..90a6ce27 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -124,6 +124,16 @@ if(fastrtps_VERSION VERSION_GREATER_EQUAL "2.4.0") ) endif() +# Modifying remote server locator list was introduced in Fast DDS v2.6.0 +if (fastrtps_VERSION VERSION_GREATER_EQUAL "2.6.0") + list(APPEND TEST_LIST + test_51_remote_server_locator_client_modification + test_52_remote_server_locator_client_modification_complex + test_53_remote_server_locator_server_client_modification + test_54_remote_server_locator_modification_interconnected_servers + ) +endif() + # The above TEST_LIST has tests that spawn multiple test cases, we need a new variable to enumerate them set(TEST_CASE_LIST) diff --git a/test/configuration/environment_files/DS_client_1.json b/test/configuration/environment_files/DS_client_1.json new file mode 100644 index 00000000..5a783796 --- /dev/null +++ b/test/configuration/environment_files/DS_client_1.json @@ -0,0 +1,3 @@ +{ + "ROS_DISCOVERY_SERVER": "localhost:11811" +} diff --git a/test/configuration/environment_files/DS_client_2.json b/test/configuration/environment_files/DS_client_2.json new file mode 100644 index 00000000..5a783796 --- /dev/null +++ b/test/configuration/environment_files/DS_client_2.json @@ -0,0 +1,3 @@ +{ + "ROS_DISCOVERY_SERVER": "localhost:11811" +} diff --git a/test/configuration/environment_files/DS_client_3.json b/test/configuration/environment_files/DS_client_3.json new file mode 100644 index 00000000..67878ccd --- /dev/null +++ b/test/configuration/environment_files/DS_client_3.json @@ -0,0 +1,3 @@ +{ + "ROS_DISCOVERY_SERVER": "localhost:11812" +} diff --git a/test/configuration/environment_files/DS_server_2.json b/test/configuration/environment_files/DS_server_2.json new file mode 100644 index 00000000..7dd3c24c --- /dev/null +++ b/test/configuration/environment_files/DS_server_2.json @@ -0,0 +1,3 @@ +{ + "ROS_DISCOVERY_SERVER": "" +} diff --git a/test/configuration/environment.json b/test/configuration/environment_files/environment.json similarity index 100% rename from test/configuration/environment.json rename to test/configuration/environment_files/environment.json diff --git a/test/configuration/test_cases/test_50_environment_modification.xml b/test/configuration/test_cases/test_50_environment_modification.xml index 7d236e8c..b3be9b72 100644 --- a/test/configuration/test_cases/test_50_environment_modification.xml +++ b/test/configuration/test_cases/test_50_environment_modification.xml @@ -37,11 +37,11 @@ - - test_39_environment_modification_initial - test_39_environment_modification_add_server2 - test_39_environment_modification_add_server1 - test_39_environment_modification_final + + test_50_environment_modification_initial + test_50_environment_modification_add_server2 + test_50_environment_modification_add_server1 + test_50_environment_modification_final diff --git a/test/configuration/test_cases/test_51_remote_server_locator_client_modification_C1.xml b/test/configuration/test_cases/test_51_remote_server_locator_client_modification_C1.xml new file mode 100644 index 00000000..599d13d1 --- /dev/null +++ b/test/configuration/test_cases/test_51_remote_server_locator_client_modification_C1.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + Initial, C1 knows Server_1 (S1_1) + Remote server locator modified, C1 has dropped S1_1 + S1_1 has been shutdown + Reconnection, C1 knows Server_1 (S1_2) + + + + + localhost:11811 + localhost:11812 + + + + + + 63.6c.69.65.6e.74.31.5f.73.31.5f.5f + + + + + topic_1 + sample_type_1 + + + + topic_2 + sample_type_1 + + + + + + + + + + + + diff --git a/test/configuration/test_cases/test_51_remote_server_locator_client_modification_S1_1.xml b/test/configuration/test_cases/test_51_remote_server_locator_client_modification_S1_1.xml new file mode 100644 index 00000000..53698352 --- /dev/null +++ b/test/configuration/test_cases/test_51_remote_server_locator_client_modification_S1_1.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + Initial, S1 knows C1 + C1 has modified remote locator + + + + + + 44.53.00.5f.45.50.52.4f.53.49.4d.41 + + + SERVER + + + + +
127.0.0.1
+ 11811 +
+
+
+
+
+
+ + + topic_1 + sample_type_1 + + + + topic_2 + sample_type_1 + + + + + + + + + + +
+
diff --git a/test/configuration/test_cases/test_51_remote_server_locator_client_modification_S1_2.xml b/test/configuration/test_cases/test_51_remote_server_locator_client_modification_S1_2.xml new file mode 100644 index 00000000..488e2432 --- /dev/null +++ b/test/configuration/test_cases/test_51_remote_server_locator_client_modification_S1_2.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + 44.53.00.5f.45.50.52.4f.53.49.4d.41 + + + SERVER + + + + +
127.0.0.1
+ 11812 +
+
+
+
+
+
+ + + topic_1 + sample_type_1 + + + + topic_2 + sample_type_1 + + + + + + + + + + +
+
diff --git a/test/configuration/test_cases/test_52_remote_server_locator_client_modification_complex_C1.xml b/test/configuration/test_cases/test_52_remote_server_locator_client_modification_complex_C1.xml new file mode 100644 index 00000000..46514031 --- /dev/null +++ b/test/configuration/test_cases/test_52_remote_server_locator_client_modification_complex_C1.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + Initial, C1 knows C2 through Server_1 (S1_1) + C1 has changes its remote locator but keeps knowing C2 + C1 knows C3 through Server_1 (S1_2) and still knows C2 + Nothing has changed with respect to the previous snapshot + + + + + localhost:11811 + localhost:11812 + + + + + + 63.6c.69.65.6e.74.31.5f.73.31.5f.5f + + + + + topic_1 + sample_type_1 + + + + + + + + + + + + diff --git a/test/configuration/test_cases/test_52_remote_server_locator_client_modification_complex_C2.xml b/test/configuration/test_cases/test_52_remote_server_locator_client_modification_complex_C2.xml new file mode 100644 index 00000000..7e4e5350 --- /dev/null +++ b/test/configuration/test_cases/test_52_remote_server_locator_client_modification_complex_C2.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + Initial, C2 knows C1 through Server_1 (S1_1) + C2 keeps knowing C1 even though C1 has changed its locators + Same situation as the previous snapshot + C2 discovers C3 through S1_2 after modifying its remote server locator + + + + + localhost:11811 + localhost:11812 + + + + + + 63.6c.69.65.6e.74.32.5f.73.31.5f.5f + + + + + topic_1 + sample_type_1 + + + + + + + + + + + + diff --git a/test/configuration/test_cases/test_52_remote_server_locator_client_modification_complex_C3.xml b/test/configuration/test_cases/test_52_remote_server_locator_client_modification_complex_C3.xml new file mode 100644 index 00000000..b2025a8c --- /dev/null +++ b/test/configuration/test_cases/test_52_remote_server_locator_client_modification_complex_C3.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + C3 knows only itself + Same situation as the previous snapshot + C3 knows C1 thorugh S1_2 + C3 knows C2 through S1_2 + + + + + localhost:11812 + + + + + + 63.6c.69.65.6e.74.33.5f.73.31.5f.5f + + + + + topic_1 + sample_type_1 + + + + + + + + + + + + diff --git a/test/configuration/test_cases/test_53_remote_server_locator_server_client_modification_C1.xml b/test/configuration/test_cases/test_53_remote_server_locator_server_client_modification_C1.xml new file mode 100644 index 00000000..c3071327 --- /dev/null +++ b/test/configuration/test_cases/test_53_remote_server_locator_server_client_modification_C1.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + Initial, C1 knows Server_1 (S1_1) + C1 knows C2 after S2 adds S1_1 as remote server + C1 does not know S1_1 after the Server_1 modifies its locators + C1 knows S1_2 and C3 through S1_2 after updating its remote server locator + Nothing has changed with respect to the previous snapshot + + + + + localhost:11811 + localhost:11813 + + + + + + 63.6c.69.65.6e.74.31.5f.73.31.5f.5f + + + + + topic_1 + sample_type_1 + + + + + + + + + + + + diff --git a/test/configuration/test_cases/test_53_remote_server_locator_server_client_modification_C2.xml b/test/configuration/test_cases/test_53_remote_server_locator_server_client_modification_C2.xml new file mode 100644 index 00000000..6498141d --- /dev/null +++ b/test/configuration/test_cases/test_53_remote_server_locator_server_client_modification_C2.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + Initial, C2 knows Server_2 (S2) + C2 knows C1 after S2 adds S1_1 as remote server + Nothing has changed with respect to the previous snapshot + Nothing has changed with respect to the previous snapshot + C2 knows C3 through S2 and S1_2 after updating S2 its remote server locator + + + + + ;localhost:11812 + + + + + + 63.6c.69.65.6e.74.32.5f.73.31.5f.5f + + + + + topic_1 + sample_type_1 + + + + + + + + + + + + diff --git a/test/configuration/test_cases/test_53_remote_server_locator_server_client_modification_C3.xml b/test/configuration/test_cases/test_53_remote_server_locator_server_client_modification_C3.xml new file mode 100644 index 00000000..f041e0e8 --- /dev/null +++ b/test/configuration/test_cases/test_53_remote_server_locator_server_client_modification_C3.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + C3 knows only itself + Nothing has changed with respect to the previous snapshot + C3 knows S1_2 + C3 knows C1 + C3 knows C2 + + + + + localhost:11813 + + + + + + 63.6c.69.65.6e.74.33.5f.73.31.5f.5f + + + + + topic_1 + sample_type_1 + + + + + + + + + + + + diff --git a/test/configuration/test_cases/test_53_remote_server_locator_server_client_modification_S2.xml b/test/configuration/test_cases/test_53_remote_server_locator_server_client_modification_S2.xml new file mode 100644 index 00000000..2ce7fdfb --- /dev/null +++ b/test/configuration/test_cases/test_53_remote_server_locator_server_client_modification_S2.xml @@ -0,0 +1,47 @@ + + + + + + + + + Initial, S2 knows C2 + S2 knows C1 because S2 adds S1_1 as remote server + S2 does not know S1_1 after the Server_1 modifies its locator + Nothing has changed with respect to the previous snapshot + S2 knows C3 because S2 updates its remote server locator + + + + + + localhost:11811 + localhost:11813 + + + + + + 44.53.01.5f.45.50.52.4f.53.49.4d.41 + + + SERVER + + + + +
127.0.0.1
+ 11812 +
+
+
+
+
+
+
+
diff --git a/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_C1.xml b/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_C1.xml new file mode 100644 index 00000000..0dba6add --- /dev/null +++ b/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_C1.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + Initial, C1 knows itself + Nothing has changed with respect to the previous snapshot + C1 dicovers all endpoints after Server_1 is relaunched listening to the new locator + + + + + + 63.6c.69.65.6e.74.31.5f.73.31.5f.5f + + + + + topic_1 + sample_type_1 + + + + + + + + + + + + diff --git a/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_C2.xml b/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_C2.xml new file mode 100644 index 00000000..24b1fad9 --- /dev/null +++ b/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_C2.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + Initial, C2 knows C3 and S1 + Nothing has changed with respect to the previous snapshot + C2 discovers C1 + + + + + + 63.6c.69.65.6e.74.32.5f.73.31.5f.5f + + + + + topic_1 + sample_type_1 + + + + + + + + + + + + diff --git a/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_C3.xml b/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_C3.xml new file mode 100644 index 00000000..3d126a98 --- /dev/null +++ b/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_C3.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + Initial, C3 knows C2 and S1 + Nothing has changed with respect to the previous snapshot + C3 discovers C1 + + + + + + 63.6c.69.65.6e.74.33.5f.73.31.5f.5f + + + + + topic_1 + sample_type_1 + + + + + + + + + + + + diff --git a/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_S1_1.xml b/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_S1_1.xml new file mode 100644 index 00000000..b4a6129a --- /dev/null +++ b/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_S1_1.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + S1 knows C2 through S2 and C3 through S3 + Nothing has changed with respect to the previous snapshot + + + + + + 44.53.00.5f.45.50.52.4f.53.49.4d.41 + + + SERVER + + + + +
127.0.0.1
+ 11811 +
+
+
+
+
+
+ + + topic_1 + sample_type_1 + + + + + + + + + + +
+
diff --git a/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_S1_2.xml b/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_S1_2.xml new file mode 100644 index 00000000..3a743f9f --- /dev/null +++ b/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_S1_2.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + S1 discovers C1 + + + + + + 44.53.00.5f.45.50.52.4f.53.49.4d.41 + + + SERVER + + + + +
127.0.0.1
+ 11814 +
+
+
+
+
+
+ + + topic_1 + sample_type_1 + + + + + + + + + + +
+
diff --git a/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_S2.xml b/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_S2.xml new file mode 100644 index 00000000..3e44a006 --- /dev/null +++ b/test/configuration/test_cases/test_54_remote_server_locator_modification_interconnected_servers_S2.xml @@ -0,0 +1,45 @@ + + + + + + + + + S2 discovers S1, C2 and C3 + Nothing has changed with respect to the previous snapshot + S2 discovers C1 + + + + + localhost:11811;;localhost:11813 + localhost:11814;;localhost:11813 + + + + + + + 44.53.01.5f.45.50.52.4f.53.49.4d.41 + + + SERVER + + + + +
127.0.0.1
+ 11812 +
+
+
+
+
+
+
+
diff --git a/test/configuration/test_solutions/test_50_environment_modification.snapshot b/test/configuration/test_solutions/test_50_environment_modification.snapshot index 713727ae..5799dde0 100644 --- a/test/configuration/test_solutions/test_50_environment_modification.snapshot +++ b/test/configuration/test_solutions/test_50_environment_modification.snapshot @@ -1,7 +1,7 @@ - test_39_environment_modification_initial + test_50_environment_modification_initial @@ -20,7 +20,7 @@ - test_39_environment_modification_add_server2 + test_50_environment_modification_add_server2 @@ -39,7 +39,7 @@ - test_39_environment_modification_add_server1 + test_50_environment_modification_add_server1 @@ -68,7 +68,7 @@ - test_39_environment_modification_final + test_50_environment_modification_final diff --git a/test/configuration/test_solutions/test_51_remote_server_locator_client_modification_C1.snapshot b/test/configuration/test_solutions/test_51_remote_server_locator_client_modification_C1.snapshot new file mode 100644 index 00000000..f8136a98 --- /dev/null +++ b/test/configuration/test_solutions/test_51_remote_server_locator_client_modification_C1.snapshot @@ -0,0 +1,48 @@ + + + + Initial, C1 knows Server_1 (S1_1) + + + + + + + + + + + + + Remote server locator modified, C1 has dropped S1_1 + + + + + + + + + + S1_1 has been shutdown + + + + + + + + + Reconnection, C1 knows Server_1 (S1_2) + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_51_remote_server_locator_client_modification_S1.snapshot b/test/configuration/test_solutions/test_51_remote_server_locator_client_modification_S1.snapshot new file mode 100644 index 00000000..3bc62852 --- /dev/null +++ b/test/configuration/test_solutions/test_51_remote_server_locator_client_modification_S1.snapshot @@ -0,0 +1,29 @@ + + + + Initial, S1 knows C1 + + + + + + + + + + + + + C1 has modified remote locator + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_52_remote_server_locator_client_modification_complex_C1.snapshot b/test/configuration/test_solutions/test_52_remote_server_locator_client_modification_complex_C1.snapshot new file mode 100644 index 00000000..bdda6003 --- /dev/null +++ b/test/configuration/test_solutions/test_52_remote_server_locator_client_modification_complex_C1.snapshot @@ -0,0 +1,67 @@ + + + + Initial, C1 knows C2 through Server_1 (S1_1) + + + + + + + + + + + + + + C1 has changes its remote locator but keeps knowing C2 + + + + + + + + + + + + + + C1 knows C3 through Server_1 (S1_2) and still knows C2 + + + + + + + + + + + + + + + + + + Nothing has changed with respect to the previous snapshot + + + + + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_52_remote_server_locator_client_modification_complex_C2.snapshot b/test/configuration/test_solutions/test_52_remote_server_locator_client_modification_complex_C2.snapshot new file mode 100644 index 00000000..149d9893 --- /dev/null +++ b/test/configuration/test_solutions/test_52_remote_server_locator_client_modification_complex_C2.snapshot @@ -0,0 +1,62 @@ + + + + Initial, C2 knows C1 through Server_1 (S1_1) + + + + + + + + + + + + + + C2 keeps knowing C1 even though C1 has changed its locators + + + + + + + + + + + + + + Same situation as the previous snapshot + + + + + + + + + + + + + C2 discovers C3 through S1_2 after modifying its remote server locator + + + + + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_52_remote_server_locator_client_modification_complex_C3.snapshot b/test/configuration/test_solutions/test_52_remote_server_locator_client_modification_complex_C3.snapshot new file mode 100644 index 00000000..8b51886c --- /dev/null +++ b/test/configuration/test_solutions/test_52_remote_server_locator_client_modification_complex_C3.snapshot @@ -0,0 +1,53 @@ + + + + C3 knows only itself + + + + + + + + + Same situation as the previous snapshot + + + + + + + + + C3 knows C1 thorugh S1_2 + + + + + + + + + + + + + + C3 knows C2 through S1_2 + + + + + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_53_remote_server_locator_server_client_modification_C1.snapshot b/test/configuration/test_solutions/test_53_remote_server_locator_server_client_modification_C1.snapshot new file mode 100644 index 00000000..585c3d79 --- /dev/null +++ b/test/configuration/test_solutions/test_53_remote_server_locator_server_client_modification_C1.snapshot @@ -0,0 +1,76 @@ + + + + Initial, C1 knows Server_1 (S1_1) + + + + + + + + + + C1 knows C2 after S2 adds S1_1 as remote server + + + + + + + + + + + + + + C1 does not know S1_1 after the Server_1 modifies its locators + + + + + + + + + + + + + C1 knows S1_2 and C3 through S1_2 after updating its remote server locator + + + + + + + + + + + + + + + + + + Nothing has changed with respect to the previous snapshot + + + + + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_53_remote_server_locator_server_client_modification_C2.snapshot b/test/configuration/test_solutions/test_53_remote_server_locator_server_client_modification_C2.snapshot new file mode 100644 index 00000000..ac949d19 --- /dev/null +++ b/test/configuration/test_solutions/test_53_remote_server_locator_server_client_modification_C2.snapshot @@ -0,0 +1,73 @@ + + + + Initial, C2 knows Server_2 (S2) + + + + + + + + + + C2 knows C1 after S2 adds S1_1 as remote server + + + + + + + + + + + + + + Nothing has changed with respect to the previous snapshot + + + + + + + + + + + + + + Nothing has changed with respect to the previous snapshot + + + + + + + + + + + + + + C2 knows C3 through S2 and S1_2 after updating S2 its remote server locator + + + + + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_53_remote_server_locator_server_client_modification_C3.snapshot b/test/configuration/test_solutions/test_53_remote_server_locator_server_client_modification_C3.snapshot new file mode 100644 index 00000000..2354e756 --- /dev/null +++ b/test/configuration/test_solutions/test_53_remote_server_locator_server_client_modification_C3.snapshot @@ -0,0 +1,63 @@ + + + + C3 knows only itself + + + + + + + + + Nothing has changed with respect to the previous snapshot + + + + + + + + + C3 knows S1_2 + + + + + + + + + + C3 knows C1 + + + + + + + + + + + + + + C3 knows C2 + + + + + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_53_remote_server_locator_server_client_modification_S2.snapshot b/test/configuration/test_solutions/test_53_remote_server_locator_server_client_modification_S2.snapshot new file mode 100644 index 00000000..f3edc7ea --- /dev/null +++ b/test/configuration/test_solutions/test_53_remote_server_locator_server_client_modification_S2.snapshot @@ -0,0 +1,70 @@ + + + + Initial, S2 knows C2 + + + + + + + + + S2 knows C1 because S2 adds S1_1 as remote server + + + + + + + + + + + + + + S2 does not know S1_1 after the Server_1 modifies its locator + + + + + + + + + + + + + Nothing has changed with respect to the previous snapshot + + + + + + + + + + + + + S2 knows C3 because S2 updates its remote server locator + + + + + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_C1.snapshot b/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_C1.snapshot new file mode 100644 index 00000000..0e914a0f --- /dev/null +++ b/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_C1.snapshot @@ -0,0 +1,42 @@ + + + + Initial, C1 knows itself + + + + + + + + + Nothing has changed with respect to the previous snapshot + + + + + + + + + C1 dicovers all endpoints after Server_1 is relaunched listening to the new locator + + + + + + + + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_C2.snapshot b/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_C2.snapshot new file mode 100644 index 00000000..b85daace --- /dev/null +++ b/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_C2.snapshot @@ -0,0 +1,61 @@ + + + + Initial, C2 knows C3 and S1 + + + + + + + + + + + + + + + + + + Nothing has changed with respect to the previous snapshot + + + + + + + + + + + + + + + + + + C2 discovers C1 + + + + + + + + + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_C3.snapshot b/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_C3.snapshot new file mode 100644 index 00000000..761eaa5a --- /dev/null +++ b/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_C3.snapshot @@ -0,0 +1,61 @@ + + + + Initial, C3 knows C2 and S1 + + + + + + + + + + + + + + + + + + Nothing has changed with respect to the previous snapshot + + + + + + + + + + + + + + + + + + C3 discovers C1 + + + + + + + + + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_S1_1.snapshot b/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_S1_1.snapshot new file mode 100644 index 00000000..98177eaa --- /dev/null +++ b/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_S1_1.snapshot @@ -0,0 +1,41 @@ + + + + S1 knows C2 through S2 and C3 through S3 + + + + + + + + + + + + + + + + + + + Nothing has changed with respect to the previous snapshot + + + + + + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_S1_2.snapshot b/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_S1_2.snapshot new file mode 100644 index 00000000..262b0fe4 --- /dev/null +++ b/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_S1_2.snapshot @@ -0,0 +1,25 @@ + + + + S1 discovers C1 + + + + + + + + + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_S2.snapshot b/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_S2.snapshot new file mode 100644 index 00000000..39c57882 --- /dev/null +++ b/test/configuration/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_S2.snapshot @@ -0,0 +1,61 @@ + + + + S2 discovers S1, C2 and C3 + + + + + + + + + + + + + + + + + + Nothing has changed with respect to the previous snapshot + + + + + + + + + + + + + + + + + + S2 discovers C1 + + + + + + + + + + + + + + + + + + + + + diff --git a/test/configuration/tests_params.json b/test/configuration/tests_params.json index 9f7ba3b8..f0078d43 100644 --- a/test/configuration/tests_params.json +++ b/test/configuration/tests_params.json @@ -2141,7 +2141,7 @@ [ { "name":"FASTDDS_ENVIRONMENT_FILE", - "value": "/environment.json" + "value": "/environment_files/environment.json" } ], "xml_config_file": "/test_cases/test_50_environment_modification.xml", @@ -2173,6 +2173,682 @@ } }, + "test_51_remote_server_locator_client_modification": + { + "description": [ + "This test is described with detail in Redmine task #13912", + "Check that CLIENTs may change its remote server locator and reconnect with the SERVER when it is", + "relaunched in that locator", + "t = 0 : Server_1 (S1_1)", + "t = 1 : Client_1 (C1) starts", + "t = 2 : C1 and S1_1 snapshot", + "t = 3 : C1 modifies its remote server locator", + "t = 10 : C1 and S1_1 snapshots", + "t = 11 : S1_1 is stopped", + "t = 13 : C1 snapshot", + "t = 16 : Server_1 is relaunched with the new locator (S1_2)", + "t = 18 : C1 snapshot" + ], + + "processes": + { + "client_1_C1": + { + "environment_variables": + [ + { + "name": "FASTDDS_ENVIRONMENT_FILE", + "value": "/environment_files/DS_client_1.json" + } + ], + "xml_config_file": "/test_cases/test_51_remote_server_locator_client_modification_C1.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_51_remote_server_locator_client_modification_C1.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_51_remote_server_locator_client_modification_C1.snapshot" + } + } + }, + + "server_1_S1_1": + { + "xml_config_file": "/test_cases/test_51_remote_server_locator_client_modification_S1_1.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_51_remote_server_locator_client_modification_S1.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_51_remote_server_locator_client_modification_S1.snapshot" + } + } + }, + + "server_1_S1_2": + { + "creation_time": 16, + "xml_config_file": "/test_cases/test_51_remote_server_locator_client_modification_S1_2.xml", + "validation": + { + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + } + } + } + } + }, + + "test_52_remote_server_locator_client_modification_complex": + { + "description": [ + "This test is described with detail in Redmine task #13912", + "Check that CLIENTs may change its remote server locator and reconnect with the SERVER when it is", + "relaunched in that locator", + "Both Client_1 and Client_2 are connected from the beginning to Server_1", + "Client_3 is pinging the locator where the Server_1 is going to be at the end", + "Server_1 is launched using the CLI", + "t = 1 : Server_1 (S1_1), Client_1 (C1), Client_2 (C2), and Client_3 (C3) are launched", + "t = 3 : C1, C2, C3 snapshots", + "t = 4 : C1 modifies its remote server locator", + "t = 11 : C1, C2, C3 snapshots", + "t = 12 : S1_1 is stopped", + "t = 14 : Server_1 is relaunched (S1_2) listening in the new locator", + "t = 16 : C1, C2, C3 snapshots", + "t = 17 : C2 modifies its remote server locator", + "t = 24 : C1, C2, C3 snapshots" + ], + + "processes": + { + "server_1_S1_1": + { + "kill_time": 12, + "tool_config": + { + "id": 0, + "address": "127.0.0.1", + "port": 11811 + }, + "validation": + { + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + } + } + }, + + "server_1_S1_2": + { + "creation_time": 14, + "kill_time": 11, + "tool_config": + { + "id": 0, + "address": "127.0.0.1", + "port": 11812 + }, + "validation": + { + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + } + } + }, + + "client_1_C1": + { + "environment_variables": + [ + { + "name": "FASTDDS_ENVIRONMENT_FILE", + "value": "/environment_files/DS_client_1.json" + } + ], + "xml_config_file": "/test_cases/test_52_remote_server_locator_client_modification_complex_C1.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_52_remote_server_locator_client_modification_complex_C1.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_52_remote_server_locator_client_modification_complex_C1.snapshot" + } + } + }, + + "client_2_C2": + { + "environment_variables": + [ + { + "name": "FASTDDS_ENVIRONMENT_FILE", + "value": "/environment_files/DS_client_2.json" + } + ], + "xml_config_file": "/test_cases/test_52_remote_server_locator_client_modification_complex_C2.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_52_remote_server_locator_client_modification_complex_C2.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_52_remote_server_locator_client_modification_complex_C2.snapshot" + } + } + }, + + "client_3_C3": + { + "environment_variables": + [ + { + "name": "FASTDDS_ENVIRONMENT_FILE", + "value": "/environment_files/DS_client_3.json" + } + ], + "xml_config_file": "/test_cases/test_52_remote_server_locator_client_modification_complex_C3.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_52_remote_server_locator_client_modification_complex_C3.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_52_remote_server_locator_client_modification_complex_C3.snapshot" + } + } + } + } + }, + + "test_53_remote_server_locator_server_client_modification": + { + "description": [ + "This test is described with detail in Redmine task #13912", + "Check that SERVERs and CLIENTs may change its remote server locator and reconnect with the remote", + "SERVER when it is relaunched listening in that new locator", + "Client_1 is connected to Server_1", + "Client_2 is connected to Server_2", + "Client_3 is pinging the locator where the Server_1 is going to be at the end", + "t = 1 : Server_1 (S1), Server_2 (S2), Client_1 (C1), Client_2 (C2), and Client_3 (C3) start", + "t = 3 : C1, C2, C3, and S2 snapshots", + "t = 4 : S2 adds S1 as remote server", + "t = 11 : C1, C2, C3, and S2 snapshots", + "t = 12 : S1_1 is stopped", + "t = 14 : Server_1 is relaunched (S1_2) listening in the new locator", + "t = 16 : C1, C2, C3, and S2 snapshots", + "t = 17 : C1 modifies its remote server locator", + "t = 24 : C1, C2, C3, and S2 snapshots", + "t = 25 : S2 modifies its remote server locator", + "t = 32 : C1, C2, C3, and S2 snapshots" + ], + + "processes": + { + "server_1_S1_1": + { + "kill_time": 12, + "tool_config": + { + "id": 0, + "address": "127.0.0.1", + "port": 11811 + }, + "validation": + { + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + } + } + }, + + "server_1_S1_2": + { + "creation_time": 14, + "kill_time": 18, + "tool_config": + { + "id": 0, + "address": "127.0.0.1", + "port": 11813 + }, + "validation": + { + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + } + } + }, + + "server_2_S2": + { + "environment_variables": + [ + { + "name": "FASTDDS_ENVIRONMENT_FILE", + "value":"/environment_files/DS_server_2.json" + } + ], + "xml_config_file": "/test_cases/test_53_remote_server_locator_server_client_modification_S2.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_53_remote_server_locator_server_client_modification_S2.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_53_remote_server_locator_server_client_modification_S2.snapshot" + } + } + }, + + "client_1_C1": + { + "environment_variables": + [ + { + "name": "FASTDDS_ENVIRONMENT_FILE", + "value": "/environment_files/DS_client_1.json" + } + ], + "xml_config_file": "/test_cases/test_53_remote_server_locator_server_client_modification_C1.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_53_remote_server_locator_server_client_modification_C1.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_53_remote_server_locator_server_client_modification_C1.snapshot" + } + } + }, + + "client_2_C2": + { + "environment_variables": + [ + { + "name": "FASTDDS_ENVIRONMENT_FILE", + "value": "/environment_files/DS_client_2.json" + } + ], + "xml_config_file": "/test_cases/test_53_remote_server_locator_server_client_modification_C2.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_53_remote_server_locator_server_client_modification_C2.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_53_remote_server_locator_server_client_modification_C2.snapshot" + } + } + }, + + "client_3_C3": + { + "environment_variables": + [ + { + "name": "FASTDDS_ENVIRONMENT_FILE", + "value": "/environment_files/DS_client_3.json" + } + ], + "xml_config_file": "/test_cases/test_53_remote_server_locator_server_client_modification_C3.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_53_remote_server_locator_server_client_modification_C3.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_53_remote_server_locator_server_client_modification_C3.snapshot" + } + } + } + } + }, + + "test_54_remote_server_locator_modification_interconnected_servers": + { + "description": [ + "This test is described with detail in Redmine task #13912", + "Complex test that checks modify remote server locators feature with several servers and clients", + "Server_1 has endpoints", + "Client_1 is pinging the locator where the Server_1 is going to be at the end", + "Client_2 is connected to Server_2", + "Client_3 is connected to Server_3", + "Server_2 is connected to Server_1 and Server_3", + "Server_3 is connected to Server_1", + "t = 1 : Server_1 (S1_1), Server_2 (S2), Server_3 (S3), Client_1 (C1), Client_2 (C2), and Client_3 (C3) starts", + "t = 3 : S1, S2, C1, C2, and C3 snapshot", + "t = 4 : S2 modifies its remote Server_1 locator", + "t = 11 : S1, S2, C1, C2, and C3 snapshot", + "t = 12 : S1_1 is stopped", + "t = 14 : Server_1 is relaunched (S1_2) listening in the new locator", + "t = 16 : S1, S2, C1, C2, and C3 snapshot" + ], + + "processes": + { + "server_1_S1_1": + { + "xml_config_file": "/test_cases/test_54_remote_server_locator_modification_interconnected_servers_S1_1.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_S1_1.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_S1_1.snapshot" + } + } + }, + + "server_1_S1_2": + { + "creation_time": 14, + "xml_config_file": "/test_cases/test_54_remote_server_locator_modification_interconnected_servers_S1_2.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_S1_2.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_S1_2.snapshot" + } + } + }, + + "server_2_S2": + { + "environment_variables": + [ + { + "name": "FASTDDS_ENVIRONMENT_FILE", + "value": "/environment_files/DS_server_2.json" + } + ], + "xml_config_file": "/test_cases/test_54_remote_server_locator_modification_interconnected_servers_S2.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_S2.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_S2.snapshot" + } + } + }, + + "server_3_S3": + { + "kill_time": 17, + "environment_variables": + [ + { + "name": "ROS_DISCOVERY_SERVER", + "value": "localhost:11811" + } + ], + "tool_config": + { + "id": 2, + "address": "127.0.0.1", + "port": 11813 + }, + "validation": + { + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + } + } + }, + + "client_1_C1": + { + "environment_variables": + [ + { + "name": "ROS_DISCOVERY_SERVER", + "value": "localhost:11814" + } + ], + "xml_config_file": "/test_cases/test_54_remote_server_locator_modification_interconnected_servers_C1.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_C1.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_C1.snapshot" + } + } + }, + + "client_2_C2": + { + "environment_variables": + [ + { + "name": "ROS_DISCOVERY_SERVER", + "value": ";localhost:11812" + } + ], + "xml_config_file": "/test_cases/test_54_remote_server_locator_modification_interconnected_servers_C2.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_C2.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_C2.snapshot" + } + } + }, + + "client_3_C3": + { + "environment_variables": + [ + { + "name": "ROS_DISCOVERY_SERVER", + "value": ";;localhost:11813" + } + ], + "xml_config_file": "/test_cases/test_54_remote_server_locator_modification_interconnected_servers_C3.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_C3.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_54_remote_server_locator_modification_interconnected_servers_C3.snapshot" + } + } + } + } + }, + "test_60_disconnection": { "description": [