diff --git a/broker/src/hidra2_broker/server/server_nottested.go b/broker/src/hidra2_broker/server/server_nottested.go index 39320081e2c2b60fc31cdeba7c1ca5dc8d20a25c..35ed53f930526c6be8c30f32204db8a8cc0d23ea 100644 --- a/broker/src/hidra2_broker/server/server_nottested.go +++ b/broker/src/hidra2_broker/server/server_nottested.go @@ -3,11 +3,11 @@ package server import ( + "errors" "hidra2_broker/utils" "log" "net/http" "strconv" - "errors" ) func StartStatistics() { @@ -19,7 +19,7 @@ func StartStatistics() { func Start() { StartStatistics() mux := utils.NewRouter(listRoutes) - log.Fatal(http.ListenAndServe("localhost:"+strconv.Itoa(settings.Port), http.HandlerFunc(mux.ServeHTTP))) + log.Fatal(http.ListenAndServe(":"+strconv.Itoa(settings.Port), http.HandlerFunc(mux.ServeHTTP))) } func ReadConfig(fname string) error { diff --git a/examples/worker/getnext_broker/CMakeLists.txt b/examples/worker/getnext_broker/CMakeLists.txt index 58f244cf82c5f36d1100d5ea47622f2671c00175..903ff9db59315b9c4c03dd680adf631f48c8efd8 100644 --- a/examples/worker/getnext_broker/CMakeLists.txt +++ b/examples/worker/getnext_broker/CMakeLists.txt @@ -10,7 +10,7 @@ set_target_properties(${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY get_target_property(VAR ${TARGET_NAME} RUNTIME_OUTPUT_DIRECTORY) -configure_file(${CMAKE_SOURCE_DIR}/tests/settings/broker_settings.json settings.json COPYONLY) +configure_file(${CMAKE_SOURCE_DIR}/tests/automatic/settings/broker_settings.json settings.json COPYONLY) add_script_test("${TARGET_NAME}" "${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME} $<TARGET_PROPERTY:hidra2-broker,EXENAME>") set (dir examples/worker/${TARGET_NAME}) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0fb7141827c5997da8294a401a2bb2a3721a238e..47f40c7bca39f70f88fe1b8a0a8d38e46fecc111 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,21 +1,3 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.7) # needed for fixtures -find_package(Threads) - -add_subdirectory(common/cpp) -add_subdirectory(system_io) - -add_subdirectory(json_parser) - -if(BUILD_MONGODB_CLIENTLIB) - add_subdirectory(mongo_db) -endif() - - -if(BUILD_BROKER) - add_subdirectory(broker) -endif() - - -add_subdirectory(worker) +add_subdirectory(automatic) diff --git a/tests/automatic/CMakeLists.txt b/tests/automatic/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..0fb7141827c5997da8294a401a2bb2a3721a238e --- /dev/null +++ b/tests/automatic/CMakeLists.txt @@ -0,0 +1,21 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.7) # needed for fixtures +find_package(Threads) + +add_subdirectory(common/cpp) +add_subdirectory(system_io) + +add_subdirectory(json_parser) + +if(BUILD_MONGODB_CLIENTLIB) + add_subdirectory(mongo_db) +endif() + + +if(BUILD_BROKER) + add_subdirectory(broker) +endif() + + +add_subdirectory(worker) + + diff --git a/tests/broker/CMakeLists.txt b/tests/automatic/broker/CMakeLists.txt similarity index 100% rename from tests/broker/CMakeLists.txt rename to tests/automatic/broker/CMakeLists.txt diff --git a/tests/broker/check_monitoring/CMakeLists.txt b/tests/automatic/broker/check_monitoring/CMakeLists.txt similarity index 66% rename from tests/broker/check_monitoring/CMakeLists.txt rename to tests/automatic/broker/check_monitoring/CMakeLists.txt index de66ca8b3e7f809565b6352cb17b31a0942ea685..19c68e39b9dc264e6ef541df207ad418a27af8f7 100644 --- a/tests/broker/check_monitoring/CMakeLists.txt +++ b/tests/automatic/broker/check_monitoring/CMakeLists.txt @@ -3,6 +3,6 @@ set(TARGET_NAME hidra2-broker) ################################ # Testing ################################ -configure_file(${CMAKE_SOURCE_DIR}/tests/settings/broker_settings.json settings.json COPYONLY) +configure_file(${CMAKE_SOURCE_DIR}/tests/automatic/settings/broker_settings.json settings.json COPYONLY) add_script_test("${TARGET_NAME}-monitoring" "$<TARGET_PROPERTY:${TARGET_NAME},EXENAME>" nomem ) diff --git a/tests/broker/check_monitoring/check_linux.sh b/tests/automatic/broker/check_monitoring/check_linux.sh similarity index 100% rename from tests/broker/check_monitoring/check_linux.sh rename to tests/automatic/broker/check_monitoring/check_linux.sh diff --git a/tests/broker/get_next/CMakeLists.txt b/tests/automatic/broker/get_next/CMakeLists.txt similarity index 66% rename from tests/broker/get_next/CMakeLists.txt rename to tests/automatic/broker/get_next/CMakeLists.txt index 4eb27c1142b81b97dcc2c6326c739b2ca1fecaac..8b5f3b6f02b77436f882d1aecebf94026cc8222a 100644 --- a/tests/broker/get_next/CMakeLists.txt +++ b/tests/automatic/broker/get_next/CMakeLists.txt @@ -3,6 +3,6 @@ set(TARGET_NAME hidra2-broker) ################################ # Testing ################################ -configure_file(${CMAKE_SOURCE_DIR}/tests/settings/broker_settings.json settings.json COPYONLY) +configure_file(${CMAKE_SOURCE_DIR}/tests/automatic/settings/broker_settings.json settings.json COPYONLY) add_script_test("${TARGET_NAME}-getnext" "$<TARGET_PROPERTY:${TARGET_NAME},EXENAME>" nomem ) diff --git a/tests/broker/get_next/check_linux.sh b/tests/automatic/broker/get_next/check_linux.sh similarity index 100% rename from tests/broker/get_next/check_linux.sh rename to tests/automatic/broker/get_next/check_linux.sh diff --git a/tests/broker/get_next/check_windows.bat b/tests/automatic/broker/get_next/check_windows.bat similarity index 100% rename from tests/broker/get_next/check_windows.bat rename to tests/automatic/broker/get_next/check_windows.bat diff --git a/tests/broker/read_config/CMakeLists.txt b/tests/automatic/broker/read_config/CMakeLists.txt similarity index 71% rename from tests/broker/read_config/CMakeLists.txt rename to tests/automatic/broker/read_config/CMakeLists.txt index a8949ad818264d362b46d90222f3ad5348f623a4..76f6467cfd21c94965a03b39d446a95e53d2ac4c 100644 --- a/tests/broker/read_config/CMakeLists.txt +++ b/tests/automatic/broker/read_config/CMakeLists.txt @@ -3,7 +3,7 @@ set(TARGET_NAME hidra2-broker) ################################ # Testing ################################ -configure_file(${CMAKE_SOURCE_DIR}/tests/settings/broker_settings.json settings_good.json COPYONLY) +configure_file(${CMAKE_SOURCE_DIR}/tests/automatic/settings/broker_settings.json settings_good.json COPYONLY) configure_file(settings_bad.json settings_bad.json COPYONLY) add_script_test("${TARGET_NAME}-readconfig" "$<TARGET_PROPERTY:${TARGET_NAME},EXENAME>" nomem ) diff --git a/tests/broker/read_config/check_linux.sh b/tests/automatic/broker/read_config/check_linux.sh similarity index 100% rename from tests/broker/read_config/check_linux.sh rename to tests/automatic/broker/read_config/check_linux.sh diff --git a/tests/broker/read_config/check_windows.bat b/tests/automatic/broker/read_config/check_windows.bat similarity index 100% rename from tests/broker/read_config/check_windows.bat rename to tests/automatic/broker/read_config/check_windows.bat diff --git a/tests/broker/read_config/settings_bad.json b/tests/automatic/broker/read_config/settings_bad.json similarity index 100% rename from tests/broker/read_config/settings_bad.json rename to tests/automatic/broker/read_config/settings_bad.json diff --git a/tests/common/cpp/CMakeLists.txt b/tests/automatic/common/cpp/CMakeLists.txt similarity index 100% rename from tests/common/cpp/CMakeLists.txt rename to tests/automatic/common/cpp/CMakeLists.txt diff --git a/tests/common/cpp/include/testing.h b/tests/automatic/common/cpp/include/testing.h similarity index 100% rename from tests/common/cpp/include/testing.h rename to tests/automatic/common/cpp/include/testing.h diff --git a/tests/common/cpp/src/testing.cpp b/tests/automatic/common/cpp/src/testing.cpp similarity index 100% rename from tests/common/cpp/src/testing.cpp rename to tests/automatic/common/cpp/src/testing.cpp diff --git a/tests/json_parser/CMakeLists.txt b/tests/automatic/json_parser/CMakeLists.txt similarity index 100% rename from tests/json_parser/CMakeLists.txt rename to tests/automatic/json_parser/CMakeLists.txt diff --git a/tests/json_parser/parse_config_file/CMakeLists.txt b/tests/automatic/json_parser/parse_config_file/CMakeLists.txt similarity index 100% rename from tests/json_parser/parse_config_file/CMakeLists.txt rename to tests/automatic/json_parser/parse_config_file/CMakeLists.txt diff --git a/tests/json_parser/parse_config_file/config.json b/tests/automatic/json_parser/parse_config_file/config.json similarity index 100% rename from tests/json_parser/parse_config_file/config.json rename to tests/automatic/json_parser/parse_config_file/config.json diff --git a/tests/json_parser/parse_config_file/config_bad.json b/tests/automatic/json_parser/parse_config_file/config_bad.json similarity index 100% rename from tests/json_parser/parse_config_file/config_bad.json rename to tests/automatic/json_parser/parse_config_file/config_bad.json diff --git a/tests/json_parser/parse_config_file/parse_config_file.cpp b/tests/automatic/json_parser/parse_config_file/parse_config_file.cpp similarity index 100% rename from tests/json_parser/parse_config_file/parse_config_file.cpp rename to tests/automatic/json_parser/parse_config_file/parse_config_file.cpp diff --git a/tests/mongo_db/CMakeLists.txt b/tests/automatic/mongo_db/CMakeLists.txt similarity index 100% rename from tests/mongo_db/CMakeLists.txt rename to tests/automatic/mongo_db/CMakeLists.txt diff --git a/tests/mongo_db/connect/CMakeLists.txt b/tests/automatic/mongo_db/connect/CMakeLists.txt similarity index 100% rename from tests/mongo_db/connect/CMakeLists.txt rename to tests/automatic/mongo_db/connect/CMakeLists.txt diff --git a/tests/mongo_db/connect/connect_mongodb.cpp b/tests/automatic/mongo_db/connect/connect_mongodb.cpp similarity index 100% rename from tests/mongo_db/connect/connect_mongodb.cpp rename to tests/automatic/mongo_db/connect/connect_mongodb.cpp diff --git a/tests/mongo_db/insert/CMakeLists.txt b/tests/automatic/mongo_db/insert/CMakeLists.txt similarity index 100% rename from tests/mongo_db/insert/CMakeLists.txt rename to tests/automatic/mongo_db/insert/CMakeLists.txt diff --git a/tests/mongo_db/insert/cleanup_linux.sh b/tests/automatic/mongo_db/insert/cleanup_linux.sh similarity index 100% rename from tests/mongo_db/insert/cleanup_linux.sh rename to tests/automatic/mongo_db/insert/cleanup_linux.sh diff --git a/tests/mongo_db/insert/cleanup_windows.bat b/tests/automatic/mongo_db/insert/cleanup_windows.bat similarity index 100% rename from tests/mongo_db/insert/cleanup_windows.bat rename to tests/automatic/mongo_db/insert/cleanup_windows.bat diff --git a/tests/mongo_db/insert/insert_mongodb.cpp b/tests/automatic/mongo_db/insert/insert_mongodb.cpp similarity index 100% rename from tests/mongo_db/insert/insert_mongodb.cpp rename to tests/automatic/mongo_db/insert/insert_mongodb.cpp diff --git a/tests/settings/broker_settings.json b/tests/automatic/settings/broker_settings.json similarity index 100% rename from tests/settings/broker_settings.json rename to tests/automatic/settings/broker_settings.json diff --git a/tests/system_io/CMakeLists.txt b/tests/automatic/system_io/CMakeLists.txt similarity index 100% rename from tests/system_io/CMakeLists.txt rename to tests/automatic/system_io/CMakeLists.txt diff --git a/tests/system_io/read_file_content/CMakeLists.txt b/tests/automatic/system_io/read_file_content/CMakeLists.txt similarity index 100% rename from tests/system_io/read_file_content/CMakeLists.txt rename to tests/automatic/system_io/read_file_content/CMakeLists.txt diff --git a/tests/system_io/read_file_content/cleanup_linux.sh b/tests/automatic/system_io/read_file_content/cleanup_linux.sh similarity index 100% rename from tests/system_io/read_file_content/cleanup_linux.sh rename to tests/automatic/system_io/read_file_content/cleanup_linux.sh diff --git a/tests/system_io/read_file_content/cleanup_windows.bat b/tests/automatic/system_io/read_file_content/cleanup_windows.bat similarity index 100% rename from tests/system_io/read_file_content/cleanup_windows.bat rename to tests/automatic/system_io/read_file_content/cleanup_windows.bat diff --git a/tests/system_io/read_file_content/read_file_content.cpp b/tests/automatic/system_io/read_file_content/read_file_content.cpp similarity index 100% rename from tests/system_io/read_file_content/read_file_content.cpp rename to tests/automatic/system_io/read_file_content/read_file_content.cpp diff --git a/tests/system_io/read_file_content/setup_linux.sh b/tests/automatic/system_io/read_file_content/setup_linux.sh similarity index 100% rename from tests/system_io/read_file_content/setup_linux.sh rename to tests/automatic/system_io/read_file_content/setup_linux.sh diff --git a/tests/system_io/read_file_content/setup_windows.bat b/tests/automatic/system_io/read_file_content/setup_windows.bat similarity index 100% rename from tests/system_io/read_file_content/setup_windows.bat rename to tests/automatic/system_io/read_file_content/setup_windows.bat diff --git a/tests/system_io/read_folder_content/CMakeLists.txt b/tests/automatic/system_io/read_folder_content/CMakeLists.txt similarity index 100% rename from tests/system_io/read_folder_content/CMakeLists.txt rename to tests/automatic/system_io/read_folder_content/CMakeLists.txt diff --git a/tests/system_io/read_folder_content/cleanup_linux.sh b/tests/automatic/system_io/read_folder_content/cleanup_linux.sh similarity index 100% rename from tests/system_io/read_folder_content/cleanup_linux.sh rename to tests/automatic/system_io/read_folder_content/cleanup_linux.sh diff --git a/tests/system_io/read_folder_content/cleanup_windows.bat b/tests/automatic/system_io/read_folder_content/cleanup_windows.bat similarity index 100% rename from tests/system_io/read_folder_content/cleanup_windows.bat rename to tests/automatic/system_io/read_folder_content/cleanup_windows.bat diff --git a/tests/system_io/read_folder_content/read_folder_content.cpp b/tests/automatic/system_io/read_folder_content/read_folder_content.cpp similarity index 100% rename from tests/system_io/read_folder_content/read_folder_content.cpp rename to tests/automatic/system_io/read_folder_content/read_folder_content.cpp diff --git a/tests/system_io/read_folder_content/setup_linux.sh b/tests/automatic/system_io/read_folder_content/setup_linux.sh similarity index 100% rename from tests/system_io/read_folder_content/setup_linux.sh rename to tests/automatic/system_io/read_folder_content/setup_linux.sh diff --git a/tests/system_io/read_folder_content/setup_windows.bat b/tests/automatic/system_io/read_folder_content/setup_windows.bat similarity index 100% rename from tests/system_io/read_folder_content/setup_windows.bat rename to tests/automatic/system_io/read_folder_content/setup_windows.bat diff --git a/tests/system_io/read_string_from_file/CMakeLists.txt b/tests/automatic/system_io/read_string_from_file/CMakeLists.txt similarity index 100% rename from tests/system_io/read_string_from_file/CMakeLists.txt rename to tests/automatic/system_io/read_string_from_file/CMakeLists.txt diff --git a/tests/system_io/read_string_from_file/cleanup_linux.sh b/tests/automatic/system_io/read_string_from_file/cleanup_linux.sh similarity index 100% rename from tests/system_io/read_string_from_file/cleanup_linux.sh rename to tests/automatic/system_io/read_string_from_file/cleanup_linux.sh diff --git a/tests/system_io/read_string_from_file/cleanup_windows.bat b/tests/automatic/system_io/read_string_from_file/cleanup_windows.bat similarity index 100% rename from tests/system_io/read_string_from_file/cleanup_windows.bat rename to tests/automatic/system_io/read_string_from_file/cleanup_windows.bat diff --git a/tests/system_io/read_string_from_file/read_string_from_file.cpp b/tests/automatic/system_io/read_string_from_file/read_string_from_file.cpp similarity index 100% rename from tests/system_io/read_string_from_file/read_string_from_file.cpp rename to tests/automatic/system_io/read_string_from_file/read_string_from_file.cpp diff --git a/tests/system_io/read_string_from_file/setup_linux.sh b/tests/automatic/system_io/read_string_from_file/setup_linux.sh similarity index 100% rename from tests/system_io/read_string_from_file/setup_linux.sh rename to tests/automatic/system_io/read_string_from_file/setup_linux.sh diff --git a/tests/system_io/read_string_from_file/setup_windows.bat b/tests/automatic/system_io/read_string_from_file/setup_windows.bat similarity index 100% rename from tests/system_io/read_string_from_file/setup_windows.bat rename to tests/automatic/system_io/read_string_from_file/setup_windows.bat diff --git a/tests/worker/CMakeLists.txt b/tests/automatic/worker/CMakeLists.txt similarity index 100% rename from tests/worker/CMakeLists.txt rename to tests/automatic/worker/CMakeLists.txt diff --git a/tests/worker/connect_multithread/CMakeLists.txt b/tests/automatic/worker/connect_multithread/CMakeLists.txt similarity index 100% rename from tests/worker/connect_multithread/CMakeLists.txt rename to tests/automatic/worker/connect_multithread/CMakeLists.txt diff --git a/tests/worker/connect_multithread/cleanup_linux.sh b/tests/automatic/worker/connect_multithread/cleanup_linux.sh similarity index 100% rename from tests/worker/connect_multithread/cleanup_linux.sh rename to tests/automatic/worker/connect_multithread/cleanup_linux.sh diff --git a/tests/worker/connect_multithread/cleanup_windows.bat b/tests/automatic/worker/connect_multithread/cleanup_windows.bat similarity index 100% rename from tests/worker/connect_multithread/cleanup_windows.bat rename to tests/automatic/worker/connect_multithread/cleanup_windows.bat diff --git a/tests/worker/connect_multithread/content_multithread.cpp b/tests/automatic/worker/connect_multithread/content_multithread.cpp similarity index 100% rename from tests/worker/connect_multithread/content_multithread.cpp rename to tests/automatic/worker/connect_multithread/content_multithread.cpp diff --git a/tests/worker/connect_multithread/setup_linux.sh b/tests/automatic/worker/connect_multithread/setup_linux.sh similarity index 100% rename from tests/worker/connect_multithread/setup_linux.sh rename to tests/automatic/worker/connect_multithread/setup_linux.sh diff --git a/tests/worker/connect_multithread/setup_windows.bat b/tests/automatic/worker/connect_multithread/setup_windows.bat similarity index 100% rename from tests/worker/connect_multithread/setup_windows.bat rename to tests/automatic/worker/connect_multithread/setup_windows.bat diff --git a/tests/worker/curl_http_client_get/CMakeLists.txt b/tests/automatic/worker/curl_http_client_get/CMakeLists.txt similarity index 100% rename from tests/worker/curl_http_client_get/CMakeLists.txt rename to tests/automatic/worker/curl_http_client_get/CMakeLists.txt diff --git a/tests/worker/curl_http_client_get/curl_httpclient_get.cpp b/tests/automatic/worker/curl_http_client_get/curl_httpclient_get.cpp similarity index 100% rename from tests/worker/curl_http_client_get/curl_httpclient_get.cpp rename to tests/automatic/worker/curl_http_client_get/curl_httpclient_get.cpp diff --git a/tests/worker/folder_to_db/CMakeLists.txt b/tests/automatic/worker/folder_to_db/CMakeLists.txt similarity index 100% rename from tests/worker/folder_to_db/CMakeLists.txt rename to tests/automatic/worker/folder_to_db/CMakeLists.txt diff --git a/tests/worker/folder_to_db/check_linux.sh b/tests/automatic/worker/folder_to_db/check_linux.sh similarity index 100% rename from tests/worker/folder_to_db/check_linux.sh rename to tests/automatic/worker/folder_to_db/check_linux.sh diff --git a/tests/worker/folder_to_db/check_windows.bat b/tests/automatic/worker/folder_to_db/check_windows.bat similarity index 100% rename from tests/worker/folder_to_db/check_windows.bat rename to tests/automatic/worker/folder_to_db/check_windows.bat diff --git a/tests/worker/next_multithread_broker/CMakeLists.txt b/tests/automatic/worker/next_multithread_broker/CMakeLists.txt similarity index 82% rename from tests/worker/next_multithread_broker/CMakeLists.txt rename to tests/automatic/worker/next_multithread_broker/CMakeLists.txt index e97403117f3b1c7e2a9f5708484ec6b71831c069..15b5b8ebbb6d39d62eaa820e6e84b031a95a6f81 100644 --- a/tests/worker/next_multithread_broker/CMakeLists.txt +++ b/tests/automatic/worker/next_multithread_broker/CMakeLists.txt @@ -11,7 +11,7 @@ target_link_libraries(${TARGET_NAME} test_common hidra2-worker ${CMAKE_THREAD_L ################################ # Testing ################################ -configure_file(${CMAKE_SOURCE_DIR}/tests/settings/broker_settings.json settings.json COPYONLY) +configure_file(${CMAKE_SOURCE_DIR}/tests/automatic/settings/broker_settings.json settings.json COPYONLY) add_script_test("${TARGET_NAME}" "$<TARGET_FILE:${TARGET_NAME}> $<TARGET_PROPERTY:hidra2-broker,EXENAME>" ) diff --git a/tests/worker/next_multithread_broker/check_linux.sh b/tests/automatic/worker/next_multithread_broker/check_linux.sh similarity index 100% rename from tests/worker/next_multithread_broker/check_linux.sh rename to tests/automatic/worker/next_multithread_broker/check_linux.sh diff --git a/tests/worker/next_multithread_broker/check_windows.bat b/tests/automatic/worker/next_multithread_broker/check_windows.bat similarity index 100% rename from tests/worker/next_multithread_broker/check_windows.bat rename to tests/automatic/worker/next_multithread_broker/check_windows.bat diff --git a/tests/worker/next_multithread_broker/next_multithread_broker.cpp b/tests/automatic/worker/next_multithread_broker/next_multithread_broker.cpp similarity index 100% rename from tests/worker/next_multithread_broker/next_multithread_broker.cpp rename to tests/automatic/worker/next_multithread_broker/next_multithread_broker.cpp diff --git a/tests/worker/next_multithread_folder/CMakeLists.txt b/tests/automatic/worker/next_multithread_folder/CMakeLists.txt similarity index 100% rename from tests/worker/next_multithread_folder/CMakeLists.txt rename to tests/automatic/worker/next_multithread_folder/CMakeLists.txt diff --git a/tests/worker/next_multithread_folder/cleanup_linux.sh b/tests/automatic/worker/next_multithread_folder/cleanup_linux.sh similarity index 100% rename from tests/worker/next_multithread_folder/cleanup_linux.sh rename to tests/automatic/worker/next_multithread_folder/cleanup_linux.sh diff --git a/tests/worker/next_multithread_folder/cleanup_windows.bat b/tests/automatic/worker/next_multithread_folder/cleanup_windows.bat similarity index 100% rename from tests/worker/next_multithread_folder/cleanup_windows.bat rename to tests/automatic/worker/next_multithread_folder/cleanup_windows.bat diff --git a/tests/worker/next_multithread_folder/next_multithread_folder.cpp b/tests/automatic/worker/next_multithread_folder/next_multithread_folder.cpp similarity index 100% rename from tests/worker/next_multithread_folder/next_multithread_folder.cpp rename to tests/automatic/worker/next_multithread_folder/next_multithread_folder.cpp diff --git a/tests/worker/next_multithread_folder/setup_linux.sh b/tests/automatic/worker/next_multithread_folder/setup_linux.sh similarity index 100% rename from tests/worker/next_multithread_folder/setup_linux.sh rename to tests/automatic/worker/next_multithread_folder/setup_linux.sh diff --git a/tests/worker/next_multithread_folder/setup_windows.bat b/tests/automatic/worker/next_multithread_folder/setup_windows.bat similarity index 100% rename from tests/worker/next_multithread_folder/setup_windows.bat rename to tests/automatic/worker/next_multithread_folder/setup_windows.bat diff --git a/tests/manual/performance_broker/settings.json b/tests/manual/performance_broker/settings.json new file mode 100644 index 0000000000000000000000000000000000000000..c45d16f2f7b59b7966ad9d2d406ef530da720a2b --- /dev/null +++ b/tests/manual/performance_broker/settings.json @@ -0,0 +1,6 @@ +{ + "BrokerDbAddress":"localhost:27017", + "MonitorDbAddress": "localhost:8086", + "MonitorDbName": "db_test", + "port":5005 +} \ No newline at end of file diff --git a/tests/manual/performance_broker/test.sh b/tests/manual/performance_broker/test.sh new file mode 100755 index 0000000000000000000000000000000000000000..3083e4e001d2898a99d52ac368b0a66e02ac4cad --- /dev/null +++ b/tests/manual/performance_broker/test.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +# starts broker, mongodb on $service_node +# reads fileset into database +# calls getnext_broker example from $worker_node + +nthreads=16 +# a directory with many files in it +dir=/gpfs/petra3/scratch/yakubov/test +run_name=test +service_node=max-wgs + +monitor_node=zitpcx27016 +monitor_port=8086 + +worker_node=max-display +#worker_node=max-wgs + +worker_dir=~/broker_test +service_dir=~/broker_test + + +cat settings.json | + jq "to_entries | + map(if .key == \"MonitorDbAddress\" + then . + {value:\"${monitor_node}:${monitor_port}\"} + else . + end + ) | + from_entries" > settings_tmp.json + +ssh ${monitor_node} influx -execute \"create database db_test\" + +ssh ${service_node} docker run -d -p 27017:27017 --name mongo mongo +#ssh ${service_node} docker run -d -p 8086 -p 8086 --name influxdb influxdb + +ssh ${service_node} mkdir ${service_dir} +ssh ${worker_node} mkdir ${worker_dir} + + +scp settings_tmp.json ${service_node}:${service_dir}/settings.json +rm settings_tmp.json +scp ../../../cmake-build-release/broker/hidra2-broker ${service_node}:${service_dir} +ssh ${service_node} "bash -c 'cd ${service_dir}; nohup ./hidra2-broker settings.json &> ${service_dir}/broker.log &'" +sleep 0.3 +scp ../../../cmake-build-release/worker/tools/folder_to_db/folder2db ${worker_node}:${worker_dir} +ssh ${worker_node} ${worker_dir}/folder2db -n ${nthreads} ${dir} ${run_name} ${service_node} + +sleep 3 + +scp ../../../cmake-build-release/examples/worker/getnext_broker/getnext_broker ${worker_node}:${worker_dir} +ssh ${worker_node} ${worker_dir}/getnext_broker ${service_node}:5005 ${run_name} ${nthreads} + + + +ssh ${service_node} killall hidra2-broker +ssh ${service_node} docker rm -f mongo +#ssh ${service_node} docker rm -f influxdb