diff --git a/CMakeLists.txt b/CMakeLists.txt index 34946582..af6e1142 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -176,17 +176,9 @@ endif() # Logging ############################################################################### -if(NOT DEFINED LOG_LEVEL_INFO) - set(LOG_LEVEL_INFO OFF) -endif() - -if(NOT DEFINED LOG_LEVEL_WARN) - set(LOG_LEVEL_WARN OFF) -endif() - -if(NOT DEFINED LOG_LEVEL_ERROR) - SET(LOG_LEVEL_ERROR ON) -endif() +option(LOG_LEVEL_INFO OFF) +option(LOG_LEVEL_WARN OFF) +option(LOG_LEVEL_ERROR OFF) add_definitions(-DLOG_LEVEL_INFO=$,ON>) add_definitions(-DLOG_LEVEL_WARN=$,ON>) diff --git a/src/DSLog.h.in b/src/DSLog.h.in index d63b0e24..fb4836d1 100644 --- a/src/DSLog.h.in +++ b/src/DSLog.h.in @@ -15,17 +15,17 @@ #ifndef _EPROSIMA_IS_LOG_H_ #define _EPROSIMA_IS_LOG_H_ -#if defined LOG_LEVEL_INFO && LOG_LEVEL_INFO +#if defined LOG_LEVEL_INFO && LOG_LEVEL_INFO #define __INTERNALDEBUG - #define __DEBUG + #define __DEBUG #undef LOG_NO_INFO #undef LOG_NO_WARN #undef LOG_NO_ERROR -#elif defined LOG_LEVEL_WARN && LOG_LEVEL_WARN +#elif defined LOG_LEVEL_WARN && LOG_LEVEL_WARN #define LOG_NO_INFO #undef LOG_NO_WARN #undef LOG_NO_ERROR -#elif defined LOG_LEVEL_ERROR && LOG_LEVEL_ERROR +#elif defined LOG_LEVEL_ERROR && LOG_LEVEL_ERROR #define LOG_NO_INFO #define LOG_NO_WARN #undef LOG_NO_ERROR diff --git a/src/main.cpp b/src/main.cpp index 5ab62478..ffc61101 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,7 +15,7 @@ #include "log/DSLog.h" #include "version/config.h" -#if FASTRTPS_VERSION_MAJOR >= 2 && FASTRTPS_VERSION_MINOR >= 1 +#if FASTRTPS_VERSION_MAJOR >= 2 || (FASTRTPS_VERSION_MAJOR == 2 && FASTRTPS_VERSION_MINOR >= 1) #include #endif #include @@ -35,21 +35,20 @@ using namespace std; int main(int argc, char * argv[]) { + // Clear all the consumers. + Log::ClearConsumers(); + // Initialize loging - #if defined LOG_LEVEL_INFO + #if LOG_LEVEL_INFO Log::SetVerbosity(Log::Kind::Info); - #elif defined LOG_LEVEL_WARN + #elif LOG_LEVEL_WARN Log::SetVerbosity(Log::Kind::Warning); - #elif defined LOG_LEVEL_ERROR + #elif LOG_LEVEL_ERROR + Log::SetVerbosity(Log::Kind::Error); + #else Log::SetVerbosity(Log::Kind::Error); #endif - // Clear all the consumers. - Log::ClearConsumers(); - - Log::SetVerbosity(Log::Kind::Error); - // Log::SetCategoryFilter(std::regex("(INTRAPROCESS)")); - #if FASTRTPS_VERSION_MAJOR >= 2 && FASTRTPS_VERSION_MINOR >= 1 // Create a StdoutErrConsumer consumer that logs entries to stderr only when the Log::Kind is equal to WARNING // This allows the test validate the output of the executions diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index bec548b1..1942bbc0 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -113,6 +113,11 @@ endif() # These tests run in all Fast DDS 2.x branches list(APPEND TEST_LIST test_38_self_connection + test_39_trivial_reconnect + test_40_trivial_server_reconnect + test_41_reconnect_with_clients + test_42_server_reconnect_with_clients + test_43_complex_reconnect ) # The above TEST_LIST has tests that spawn multiple test cases, we need a new variable to enumerate them diff --git a/test/configuration/test_cases/test_39_trivial_reconnect_A.xml b/test/configuration/test_cases/test_39_trivial_reconnect_A.xml new file mode 100644 index 00000000..3bf1809d --- /dev/null +++ b/test/configuration/test_cases/test_39_trivial_reconnect_A.xml @@ -0,0 +1,40 @@ + + + + + + + + + Knows server B + Do not know server B + Knows server B + + + + + + 44.49.53.43.53.45.52.56.45.52.5F.31 + + + SERVER + + 0 + + DURATION_INFINITY + DURATION_INFINITY + + + + +
127.0.0.1
+ 39811 +
+
+
+
+
+
+ +
+
diff --git a/test/configuration/test_cases/test_39_trivial_reconnect_B.xml b/test/configuration/test_cases/test_39_trivial_reconnect_B.xml new file mode 100644 index 00000000..5fb5a5eb --- /dev/null +++ b/test/configuration/test_cases/test_39_trivial_reconnect_B.xml @@ -0,0 +1,52 @@ + + + + + + + + + Knows A + Do not know A + + + + + + + 44.49.53.43.53.45.52.56.45.52.5F.32 + + + SERVER + + + + + +
127.0.0.1
+ 39811 +
+
+
+
+
+ + 0 + + DURATION_INFINITY + DURATION_INFINITY +
+ + + +
127.0.0.1
+ 39812 +
+
+
+
+
+
+ +
+
diff --git a/test/configuration/test_cases/test_40_trivial_server_reconnect_A.xml b/test/configuration/test_cases/test_40_trivial_server_reconnect_A.xml new file mode 100644 index 00000000..bfa18b65 --- /dev/null +++ b/test/configuration/test_cases/test_40_trivial_server_reconnect_A.xml @@ -0,0 +1,52 @@ + + + + + + + + + Knows server B + Do not know server B + Knows server B + + + + + + 44.49.53.43.53.45.52.56.45.52.5F.31 + + + SERVER + + + + + +
127.0.0.1
+ 40812 +
+
+
+
+
+ + 0 + + DURATION_INFINITY + DURATION_INFINITY +
+ + + +
127.0.0.1
+ 40811 +
+
+
+
+
+
+ +
+
diff --git a/test/configuration/test_cases/test_40_trivial_server_reconnect_B.xml b/test/configuration/test_cases/test_40_trivial_server_reconnect_B.xml new file mode 100644 index 00000000..0e11be67 --- /dev/null +++ b/test/configuration/test_cases/test_40_trivial_server_reconnect_B.xml @@ -0,0 +1,40 @@ + + + + + + + + + Knows A + Do not know A + + + + + + + 44.49.53.43.53.45.52.56.45.52.5F.32 + + + SERVER + + 0 + + DURATION_INFINITY + DURATION_INFINITY + + + + +
127.0.0.1
+ 40812 +
+
+
+
+
+
+ +
+
diff --git a/test/configuration/test_cases/test_41_reconnect_with_clients_A.xml b/test/configuration/test_cases/test_41_reconnect_with_clients_A.xml new file mode 100644 index 00000000..fa1882b5 --- /dev/null +++ b/test/configuration/test_cases/test_41_reconnect_with_clients_A.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + Knows server B, client A and client B + Do not know server B + Knows server B, client A and client B + + + + + + + 63.6c.69.65.6e.74.31.5f.73.31.5f.5f + + + CLIENT + + + + + +
127.0.0.1
+ 41811 +
+
+
+
+
+ + 0 + + DURATION_INFINITY + DURATION_INFINITY +
+
+
+
+ + + + 44.49.53.43.53.45.52.56.45.52.5F.31 + + + SERVER + + 0 + + DURATION_INFINITY + DURATION_INFINITY + + + + +
127.0.0.1
+ 41811 +
+
+
+
+
+
+ + + topic_1 + sample_type_1 + + + + + + + + + + + +
+
diff --git a/test/configuration/test_cases/test_41_reconnect_with_clients_B.xml b/test/configuration/test_cases/test_41_reconnect_with_clients_B.xml new file mode 100644 index 00000000..45c5cf39 --- /dev/null +++ b/test/configuration/test_cases/test_41_reconnect_with_clients_B.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + Knows server A, client A and client B + Do not know server A + + + + + + + 63.6c.69.65.6e.74.32.5f.73.31.5f.5f + + + CLIENT + + + + + +
127.0.0.1
+ 41812 +
+
+
+
+
+ + 0 + + DURATION_INFINITY + DURATION_INFINITY +
+
+
+
+ + + + 44.49.53.43.53.45.52.56.45.52.5F.32 + + + SERVER + + + + + +
127.0.0.1
+ 41811 +
+
+
+
+
+ + 0 + + DURATION_INFINITY + DURATION_INFINITY +
+ + + +
127.0.0.1
+ 41812 +
+
+
+
+
+
+ + + topic_1 + sample_type_1 + + + + + + + + + + + +
+
diff --git a/test/configuration/test_cases/test_42_server_reconnect_with_clients_A.xml b/test/configuration/test_cases/test_42_server_reconnect_with_clients_A.xml new file mode 100644 index 00000000..3d74074e --- /dev/null +++ b/test/configuration/test_cases/test_42_server_reconnect_with_clients_A.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + Knows server B, client A and client B + Do not know server B + Knows server B, client A and client B + + + + + + + 63.6c.69.65.6e.74.31.5f.73.31.5f.5f + + + CLIENT + + + + + +
127.0.0.1
+ 42811 +
+
+
+
+
+ + 0 + + DURATION_INFINITY + DURATION_INFINITY +
+
+
+
+ + + + 44.49.53.43.53.45.52.56.45.52.5F.31 + + + SERVER + + + + + +
127.0.0.1
+ 42812 +
+
+
+
+
+ + 0 + + DURATION_INFINITY + DURATION_INFINITY +
+ + + +
127.0.0.1
+ 42811 +
+
+
+
+
+
+ + + topic_1 + sample_type_1 + + + + + + + + + + + +
+
diff --git a/test/configuration/test_cases/test_42_server_reconnect_with_clients_B.xml b/test/configuration/test_cases/test_42_server_reconnect_with_clients_B.xml new file mode 100644 index 00000000..e2bf1417 --- /dev/null +++ b/test/configuration/test_cases/test_42_server_reconnect_with_clients_B.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + Knows server A, client A and client B + Do not know server A + + + + + + + 63.6c.69.65.6e.74.32.5f.73.31.5f.5f + + + CLIENT + + + + + +
127.0.0.1
+ 42812 +
+
+
+
+
+ + 0 + + DURATION_INFINITY + DURATION_INFINITY +
+
+
+
+ + + + 44.49.53.43.53.45.52.56.45.52.5F.32 + + + SERVER + + 0 + + DURATION_INFINITY + DURATION_INFINITY + + + + +
127.0.0.1
+ 42812 +
+
+
+
+
+
+ + + topic_1 + sample_type_1 + + + + + + + + + + + +
+
diff --git a/test/configuration/test_cases/test_43_complex_reconnect_A1.xml b/test/configuration/test_cases/test_43_complex_reconnect_A1.xml new file mode 100644 index 00000000..3d0cf8d6 --- /dev/null +++ b/test/configuration/test_cases/test_43_complex_reconnect_A1.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + Knows server B, client A and client B + Do not know server B + Knows server B, client A and client B + + + + + + 63.6c.69.65.6e.74.31.5f.73.31.5f.5f + + + CLIENT + + + + + +
127.0.0.1
+ 43811 +
+
+
+
+
+ + 0 + + DURATION_INFINITY + DURATION_INFINITY +
+
+
+
+ + + + 44.49.53.43.53.45.52.56.45.52.5F.31 + + + SERVER + + 0 + + DURATION_INFINITY + DURATION_INFINITY + + + + +
127.0.0.1
+ 43811 +
+
+
+
+
+
+ + + topic_1 + sample_type_1 + + + + + + + + + + + +
+
diff --git a/test/configuration/test_cases/test_43_complex_reconnect_A2.xml b/test/configuration/test_cases/test_43_complex_reconnect_A2.xml new file mode 100644 index 00000000..842b0be6 --- /dev/null +++ b/test/configuration/test_cases/test_43_complex_reconnect_A2.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + Knows server B, client A and client B + Not know B + + + + + + 63.6c.69.65.6e.74.31.5f.73.31.5f.5f + + + CLIENT + + + + + +
127.0.0.1
+ 43811 +
+
+
+
+
+ + 0 + + DURATION_INFINITY + DURATION_INFINITY +
+
+
+
+ + + + 44.49.53.43.53.45.52.56.45.52.5F.31 + + + SERVER + + 0 + + DURATION_INFINITY + DURATION_INFINITY + + + + +
127.0.0.1
+ 43811 +
+
+
+
+
+
+ + + topic_1 + sample_type_1 + + + + + + + + + + + +
+
diff --git a/test/configuration/test_cases/test_43_complex_reconnect_B1.xml b/test/configuration/test_cases/test_43_complex_reconnect_B1.xml new file mode 100644 index 00000000..49704fce --- /dev/null +++ b/test/configuration/test_cases/test_43_complex_reconnect_B1.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + Knows server A, client A and client B + + + + + + 63.6c.69.65.6e.74.32.5f.73.31.5f.5f + + + CLIENT + + + + + +
127.0.0.1
+ 43812 +
+
+
+
+
+ + 0 + + DURATION_INFINITY + DURATION_INFINITY +
+
+
+
+ + + + 44.49.53.43.53.45.52.56.45.52.5F.32 + + + SERVER + + + + + +
127.0.0.1
+ 43811 +
+
+
+
+
+ + 0 + + DURATION_INFINITY + DURATION_INFINITY +
+ + + +
127.0.0.1
+ 43812 +
+
+
+
+
+
+ + + topic_1 + sample_type_1 + + + + + + + + + + + +
+
diff --git a/test/configuration/test_cases/test_43_complex_reconnect_B2.xml b/test/configuration/test_cases/test_43_complex_reconnect_B2.xml new file mode 100644 index 00000000..365d0e5b --- /dev/null +++ b/test/configuration/test_cases/test_43_complex_reconnect_B2.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + Knows server A, client A and client B + Not know server A + Knows server A, client A and client B + + + + + + 63.6c.69.65.6e.74.32.5f.73.31.5f.5f + + + CLIENT + + + + + +
127.0.0.1
+ 43812 +
+
+
+
+
+ + 0 + + DURATION_INFINITY + DURATION_INFINITY +
+
+
+
+ + + + 44.49.53.43.53.45.52.56.45.52.5F.32 + + + SERVER + + + + + +
127.0.0.1
+ 43811 +
+
+
+
+
+ + 0 + + DURATION_INFINITY + DURATION_INFINITY +
+ + + +
127.0.0.1
+ 43812 +
+
+
+
+
+
+ + + topic_1 + sample_type_1 + + + + + + + + + + + +
+
diff --git a/test/configuration/test_solutions/test_39_trivial_reconnect_A.snapshot b/test/configuration/test_solutions/test_39_trivial_reconnect_A.snapshot new file mode 100644 index 00000000..f93ef9d6 --- /dev/null +++ b/test/configuration/test_solutions/test_39_trivial_reconnect_A.snapshot @@ -0,0 +1,19 @@ + + + + Knows server B + + + + + + Do not know server B + + + + Knows server B + + + + + diff --git a/test/configuration/test_solutions/test_39_trivial_reconnect_B.snapshot b/test/configuration/test_solutions/test_39_trivial_reconnect_B.snapshot new file mode 100644 index 00000000..a068759c --- /dev/null +++ b/test/configuration/test_solutions/test_39_trivial_reconnect_B.snapshot @@ -0,0 +1,13 @@ + + + + Knows A + + + + + + Do not know A + + + diff --git a/test/configuration/test_solutions/test_40_trivial_server_reconnect_A.snapshot b/test/configuration/test_solutions/test_40_trivial_server_reconnect_A.snapshot new file mode 100644 index 00000000..f93ef9d6 --- /dev/null +++ b/test/configuration/test_solutions/test_40_trivial_server_reconnect_A.snapshot @@ -0,0 +1,19 @@ + + + + Knows server B + + + + + + Do not know server B + + + + Knows server B + + + + + diff --git a/test/configuration/test_solutions/test_40_trivial_server_reconnect_B.snapshot b/test/configuration/test_solutions/test_40_trivial_server_reconnect_B.snapshot new file mode 100644 index 00000000..6f950d41 --- /dev/null +++ b/test/configuration/test_solutions/test_40_trivial_server_reconnect_B.snapshot @@ -0,0 +1,13 @@ + + + + Knows A + + + + + + Do not know A + + + diff --git a/test/configuration/test_solutions/test_41_reconnect_with_clients_A.snapshot b/test/configuration/test_solutions/test_41_reconnect_with_clients_A.snapshot new file mode 100644 index 00000000..a0fdbe5c --- /dev/null +++ b/test/configuration/test_solutions/test_41_reconnect_with_clients_A.snapshot @@ -0,0 +1,59 @@ + + + + Knows server B, client A and client B + + + + + + + + + + + + + + + + + + + + + Do not know server B + + + + + + + + + + + + + + Knows server B, client A and client B + + + + + + + + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_41_reconnect_with_clients_B.snapshot b/test/configuration/test_solutions/test_41_reconnect_with_clients_B.snapshot new file mode 100644 index 00000000..108f0af5 --- /dev/null +++ b/test/configuration/test_solutions/test_41_reconnect_with_clients_B.snapshot @@ -0,0 +1,38 @@ + + + + Knows server A, client A and client B + + + + + + + + + + + + + + + + + + + + + Do not know server A + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_42_server_reconnect_with_clients_A.snapshot b/test/configuration/test_solutions/test_42_server_reconnect_with_clients_A.snapshot new file mode 100644 index 00000000..5a8dc350 --- /dev/null +++ b/test/configuration/test_solutions/test_42_server_reconnect_with_clients_A.snapshot @@ -0,0 +1,59 @@ + + + + Knows server B, client A and client B + + + + + + + + + + + + + + + + + + + + + Do not know server B + + + + + + + + + + + + + + Knows server B, client A and client B + + + + + + + + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_42_server_reconnect_with_clients_B.snapshot b/test/configuration/test_solutions/test_42_server_reconnect_with_clients_B.snapshot new file mode 100644 index 00000000..6e0344ae --- /dev/null +++ b/test/configuration/test_solutions/test_42_server_reconnect_with_clients_B.snapshot @@ -0,0 +1,38 @@ + + + + Knows server A, client A and client B + + + + + + + + + + + + + + + + + + + + + Do not know server A + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_43_complex_reconnect_A1.snapshot b/test/configuration/test_solutions/test_43_complex_reconnect_A1.snapshot new file mode 100644 index 00000000..42dd1fb8 --- /dev/null +++ b/test/configuration/test_solutions/test_43_complex_reconnect_A1.snapshot @@ -0,0 +1,59 @@ + + + + Knows server B, client A and client B + + + + + + + + + + + + + + + + + + + + + Do not know server B + + + + + + + + + + + + + + Knows server B, client A and client B + + + + + + + + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_43_complex_reconnect_A2.snapshot b/test/configuration/test_solutions/test_43_complex_reconnect_A2.snapshot new file mode 100644 index 00000000..c5f4ca15 --- /dev/null +++ b/test/configuration/test_solutions/test_43_complex_reconnect_A2.snapshot @@ -0,0 +1,38 @@ + + + + Knows server B, client A and client B + + + + + + + + + + + + + + + + + + + + + Not know B + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_43_complex_reconnect_B1.snapshot b/test/configuration/test_solutions/test_43_complex_reconnect_B1.snapshot new file mode 100644 index 00000000..2a910970 --- /dev/null +++ b/test/configuration/test_solutions/test_43_complex_reconnect_B1.snapshot @@ -0,0 +1,24 @@ + + + + Knows server A, client A and client B + + + + + + + + + + + + + + + + + + + + diff --git a/test/configuration/test_solutions/test_43_complex_reconnect_B2.snapshot b/test/configuration/test_solutions/test_43_complex_reconnect_B2.snapshot new file mode 100644 index 00000000..a9563770 --- /dev/null +++ b/test/configuration/test_solutions/test_43_complex_reconnect_B2.snapshot @@ -0,0 +1,59 @@ + + + + Knows server A, client A and client B + + + + + + + + + + + + + + + + + + + + + Not know server A + + + + + + + + + + + + + + Knows server A, client A and client B + + + + + + + + + + + + + + + + + + + + diff --git a/test/configuration/tests_params.json b/test/configuration/tests_params.json index fce70674..79f129c1 100644 --- a/test/configuration/tests_params.json +++ b/test/configuration/tests_params.json @@ -1519,6 +1519,471 @@ } }, + "test_39_trivial_reconnect": + { + "description": [ + "Server B connects with Server A. Server B leaves. Server B turns back with same configuration" + ], + + "processes": + { + "serverA": + { + "xml_config_file": "/test_cases/test_39_trivial_reconnect_A.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_39_trivial_reconnect_A.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "generate_validation": + { + "disposals": true, + "server_endpoints": false + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_39_trivial_reconnect_A.snapshot" + } + } + }, + + "serverB_1": + { + "xml_config_file": "/test_cases/test_39_trivial_reconnect_B.xml", + "validation": + { + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + } + } + }, + + "serverB_2": + { + "creation_time": 7, + "xml_config_file": "/test_cases/test_39_trivial_reconnect_B.xml", + "validation": + { + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "count_lines_validation": + { + "file_path": "/test_solutions/test_39_trivial_reconnect_B.snapshot" + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_39_trivial_reconnect_B.snapshot" + } + } + } + } + }, + + "test_40_trivial_server_reconnect": + { + "description": [ + "Server A connects with Server B. Server B leaves. Server B turns back with same configuration", + "It requires more time than usual in order to announce Server A DATA(P) and receive it and reply in B" + ], + + "processes": + { + "serverA": + { + "xml_config_file": "/test_cases/test_40_trivial_server_reconnect_A.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_40_trivial_server_reconnect_A.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "generate_validation": + { + "disposals": true, + "server_endpoints": false + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_40_trivial_server_reconnect_A.snapshot" + } + } + }, + + "serverB_1": + { + "xml_config_file": "/test_cases/test_40_trivial_server_reconnect_B.xml", + "validation": + { + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + } + + } + }, + + "serverB_2": + { + "creation_time": 8, + "xml_config_file": "/test_cases/test_40_trivial_server_reconnect_B.xml", + "validation": + { + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "count_lines_validation": + { + "file_path": "/test_solutions/test_40_trivial_server_reconnect_B.snapshot" + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_40_trivial_server_reconnect_B.snapshot" + } + } + } + } + }, + + "test_41_reconnect_with_clients": + { + "description": [ + "Server B connects with Server A. Server B leaves. Server B turns back with same configuration" + ], + + "processes": + { + "serverA": + { + "xml_config_file": "/test_cases/test_41_reconnect_with_clients_A.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_41_reconnect_with_clients_A.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "generate_validation": + { + "disposals": true, + "server_endpoints": false + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_41_reconnect_with_clients_A.snapshot" + } + } + }, + + "serverB_1": + { + "xml_config_file": "/test_cases/test_41_reconnect_with_clients_B.xml", + "validation": + { + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + } + } + }, + + "serverB_2": + { + "creation_time": 9, + "xml_config_file": "/test_cases/test_41_reconnect_with_clients_B.xml", + "validation": + { + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "count_lines_validation": + { + "file_path": "/test_solutions/test_41_reconnect_with_clients_B.snapshot" + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_41_reconnect_with_clients_B.snapshot" + } + } + } + } + }, + + "test_42_server_reconnect_with_clients": + { + "description": [ + "Server A connects with Server B. Server B leaves. Server B turns back with same configuration" + ], + + "processes": + { + "serverA": + { + "xml_config_file": "/test_cases/test_42_server_reconnect_with_clients_A.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_42_server_reconnect_with_clients_A.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "generate_validation": + { + "disposals": true, + "server_endpoints": false + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_42_server_reconnect_with_clients_A.snapshot" + } + } + }, + + "serverB_1": + { + "xml_config_file": "/test_cases/test_42_server_reconnect_with_clients_B.xml", + "validation": + { + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + } + } + }, + + "serverB_2": + { + "creation_time": 9, + "xml_config_file": "/test_cases/test_42_server_reconnect_with_clients_B.xml", + "validation": + { + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "count_lines_validation": + { + "file_path": "/test_solutions/test_42_server_reconnect_with_clients_B.snapshot" + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_42_server_reconnect_with_clients_B.snapshot" + } + } + } + } + }, + + "test_43_complex_reconnect": + { + "description": [ + "Server B connects with server A. Server B leaves. Server B start again. Server A leaves, Server A start again", + "Both Servers should know every information from the other before leaving and after restarting", + "t = 0 : A1 starts & B1 starts", + "t = 2 : A1 snapshot", + "t = 3 : B1 snapshot & B1 finish", + "t = 6 : A1 snapshot", + + "t = 7 : B2 starts", + "t = 11 : B2 snapshot", + "t = 12 : A1 snapshot & A1 finish", + "t = 15 : B2 snapshot", + + "t = 16 : A2 starts", + "t = 20 : A2 snapshot", + "t = 21 : B2 snapshot & B2 finish", + "t = 24 : A2 snapshot & A2 finish" + ], + + "processes": + { + "serverA_1": + { + "xml_config_file": "/test_cases/test_43_complex_reconnect_A1.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_43_complex_reconnect_A1.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "generate_validation": + { + "disposals": true, + "server_endpoints": false + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_43_complex_reconnect_A1.snapshot" + } + } + }, + + "serverA_2": + { + "creation_time": 16, + "xml_config_file": "/test_cases/test_43_complex_reconnect_A2.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_43_complex_reconnect_A2.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "generate_validation": + { + "disposals": true, + "server_endpoints": false + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_43_complex_reconnect_A2.snapshot" + } + } + }, + + "serverB_1": + { + "xml_config_file": "/test_cases/test_43_complex_reconnect_B1.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_43_complex_reconnect_B1.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "generate_validation": + { + "disposals": true, + "server_endpoints": false + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_43_complex_reconnect_B1.snapshot" + } + } + }, + + "serverB_2": + { + "creation_time": 7, + "xml_config_file": "/test_cases/test_43_complex_reconnect_B2.xml", + "validation": + { + "count_lines_validation": + { + "file_path": "/test_solutions/test_43_complex_reconnect_B2.snapshot" + }, + "exit_code_validation": + { + "expected_exit_code": 0 + }, + "stderr_validation": + { + "err_expected_lines": 0 + }, + "generate_validation": + { + "disposals": true, + "server_endpoints": false + }, + "ground_truth_validation": + { + "file_path": "/test_solutions/test_43_complex_reconnect_B2.snapshot" + } + } + } + } + }, + "test_99_tcp": { "processes":