From 250c0a1e13ce9a39326e6b8bc3cecc42f9a47a6c Mon Sep 17 00:00:00 2001 From: Emanuele Danovaro Date: Thu, 26 Feb 2026 09:41:45 +0100 Subject: [PATCH 1/6] workaround to try to stabilise fdb_test_remote_api on github runners --- tests/fdb/remote/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/fdb/remote/CMakeLists.txt b/tests/fdb/remote/CMakeLists.txt index 4b7819057..4f455d72d 100644 --- a/tests/fdb/remote/CMakeLists.txt +++ b/tests/fdb/remote/CMakeLists.txt @@ -26,6 +26,7 @@ if (HAVE_FDB_BUILD_TOOLS AND HAVE_GRIB) TEST_PROPERTIES TIMEOUT 300 RESOURCE_LOCK fdb_remote_tests # Prevent concurrent runs of remote tests + RUN_SERIAL TRUE LABELS remotefdb ) endif() From e96fc75c6ab0fc49038e3912dc8d0af4c8f242b1 Mon Sep 17 00:00:00 2001 From: Emanuele Danovaro Date: Thu, 26 Feb 2026 11:07:42 +0100 Subject: [PATCH 2/6] kill fdb-server instances before running unit tests --- tests/CMakeLists.txt | 13 +++++++++++++ tests/fdb/remote/CMakeLists.txt | 2 +- tests/regressions/FDB-419/CMakeLists.txt | 1 + tests/regressions/FDB-491/CMakeLists.txt | 2 +- tests/regressions/FDB-595/CMakeLists.txt | 1 + tests/regressions/FDB-610/CMakeLists.txt | 1 + 6 files changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 42d134fef..a75af3307 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -14,6 +14,19 @@ endif() include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ) +if (HAVE_FDB_REMOTE) + ecbuild_configure_file( fdb_remote_cleanup.sh.in fdb_remote_cleanup.sh @ONLY ) + + ecbuild_add_test( + TARGET fdb_test_remote_cleanup + TYPE SCRIPT + COMMAND fdb_remote_cleanup.sh + TEST_PROPERTIES + RESOURCE_LOCK fdb_remote_tests # Prevent concurrent runs of remote tests + LABELS remotefdb + ) +endif() + add_subdirectory( fdb ) add_subdirectory( chunked_data_view ) add_subdirectory( regressions ) diff --git a/tests/fdb/remote/CMakeLists.txt b/tests/fdb/remote/CMakeLists.txt index 4f455d72d..498507fd7 100644 --- a/tests/fdb/remote/CMakeLists.txt +++ b/tests/fdb/remote/CMakeLists.txt @@ -21,7 +21,7 @@ if (HAVE_FDB_BUILD_TOOLS AND HAVE_GRIB) TYPE SCRIPT COMMAND ${FDB_TEST_SERVER_SCRIPT} ARGS ${CMAKE_CURRENT_BINARY_DIR} client.yaml catalogue.yaml store.yaml - TEST_DEPENDS fdb_test_remote_api_bin + TEST_DEPENDS "fdb_test_remote_cleanup;fdb_test_remote_api_bin" ENVIRONMENT "${test_environment}" TEST_PROPERTIES TIMEOUT 300 diff --git a/tests/regressions/FDB-419/CMakeLists.txt b/tests/regressions/FDB-419/CMakeLists.txt index 2c2cc4f34..19ae2da65 100644 --- a/tests/regressions/FDB-419/CMakeLists.txt +++ b/tests/regressions/FDB-419/CMakeLists.txt @@ -17,6 +17,7 @@ ecbuild_add_test( SOURCES fdb_419_regression_test.cc LIBS fdb5 eckit metkit ENVIRONMENT FDB_SERVER_EXECUTABLE=$ + TEST_DEPENDS fdb_test_remote_cleanup ENVIRONMENT "${test_environment}" TEST_PROPERTIES RESOURCE_LOCK fdb_remote_tests # Prevent concurrent runs of remote tests diff --git a/tests/regressions/FDB-491/CMakeLists.txt b/tests/regressions/FDB-491/CMakeLists.txt index e4c61f993..26be9e48f 100644 --- a/tests/regressions/FDB-491/CMakeLists.txt +++ b/tests/regressions/FDB-491/CMakeLists.txt @@ -13,7 +13,7 @@ ecbuild_add_test( TYPE SCRIPT COMMAND ${FDB_TEST_SERVER_SCRIPT} ARGS ${CMAKE_CURRENT_BINARY_DIR} client.yaml catalogue.yaml store.yaml - TEST_DEPENDS fdb_test_remote_api_bin + TEST_DEPENDS "fdb_test_remote_cleanup;fdb_test_remote_api_bin" ENVIRONMENT "${test_environment}" TEST_PROPERTIES TIMEOUT 300 diff --git a/tests/regressions/FDB-595/CMakeLists.txt b/tests/regressions/FDB-595/CMakeLists.txt index 8206088e4..cac5fb12a 100644 --- a/tests/regressions/FDB-595/CMakeLists.txt +++ b/tests/regressions/FDB-595/CMakeLists.txt @@ -6,6 +6,7 @@ ecbuild_add_test( TARGET FDB-595 TYPE SCRIPT COMMAND ${CMAKE_CURRENT_BINARY_DIR}/FDB-595.sh + TEST_DEPENDS fdb_test_remote_cleanup ENVIRONMENT "${test_environment}" TEST_PROPERTIES RESOURCE_LOCK fdb_remote_tests # Prevent concurrent runs of remote tests diff --git a/tests/regressions/FDB-610/CMakeLists.txt b/tests/regressions/FDB-610/CMakeLists.txt index 64153fc04..4c532f1d2 100644 --- a/tests/regressions/FDB-610/CMakeLists.txt +++ b/tests/regressions/FDB-610/CMakeLists.txt @@ -21,6 +21,7 @@ ecbuild_add_test( TARGET FDB-610 TYPE SCRIPT COMMAND ${CMAKE_CURRENT_BINARY_DIR}/FDB-610.sh + TEST_DEPENDS fdb_test_remote_cleanup ENVIRONMENT "${test_environment}" TEST_PROPERTIES RESOURCE_LOCK fdb_remote_tests # Prevent concurrent runs of remote tests From f4bcee244faf220fdca2ea4b82e88408c0cc9f75 Mon Sep 17 00:00:00 2001 From: Emanuele Danovaro Date: Thu, 26 Feb 2026 11:08:14 +0100 Subject: [PATCH 3/6] kill fdb-server instances before running unit tests --- tests/fdb_remote_cleanup.sh.in | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 tests/fdb_remote_cleanup.sh.in diff --git a/tests/fdb_remote_cleanup.sh.in b/tests/fdb_remote_cleanup.sh.in new file mode 100755 index 000000000..c5146b175 --- /dev/null +++ b/tests/fdb_remote_cleanup.sh.in @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +killall fdb-server || true \ No newline at end of file From 692f1afd280ccee4f1e4b29990679a743c166f34 Mon Sep 17 00:00:00 2001 From: Emanuele Danovaro Date: Thu, 26 Feb 2026 11:56:53 +0100 Subject: [PATCH 4/6] testing fdb remote with improved concurrency --- tests/fdb/remote/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fdb/remote/CMakeLists.txt b/tests/fdb/remote/CMakeLists.txt index 498507fd7..0951952f0 100644 --- a/tests/fdb/remote/CMakeLists.txt +++ b/tests/fdb/remote/CMakeLists.txt @@ -26,7 +26,7 @@ if (HAVE_FDB_BUILD_TOOLS AND HAVE_GRIB) TEST_PROPERTIES TIMEOUT 300 RESOURCE_LOCK fdb_remote_tests # Prevent concurrent runs of remote tests - RUN_SERIAL TRUE + # RUN_SERIAL TRUE LABELS remotefdb ) endif() From 2c22635d7950013510af682c2bcec6f606e4bc4c Mon Sep 17 00:00:00 2001 From: Emanuele Danovaro Date: Thu, 26 Feb 2026 12:04:32 +0100 Subject: [PATCH 5/6] executing fdb_test_remote_api in isolation --- tests/fdb/remote/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fdb/remote/CMakeLists.txt b/tests/fdb/remote/CMakeLists.txt index 0951952f0..498507fd7 100644 --- a/tests/fdb/remote/CMakeLists.txt +++ b/tests/fdb/remote/CMakeLists.txt @@ -26,7 +26,7 @@ if (HAVE_FDB_BUILD_TOOLS AND HAVE_GRIB) TEST_PROPERTIES TIMEOUT 300 RESOURCE_LOCK fdb_remote_tests # Prevent concurrent runs of remote tests - # RUN_SERIAL TRUE + RUN_SERIAL TRUE LABELS remotefdb ) endif() From f812a73b7b556d1090dd455f027184cef510a4dd Mon Sep 17 00:00:00 2001 From: Emanuele Danovaro Date: Thu, 26 Feb 2026 14:55:13 +0100 Subject: [PATCH 6/6] fdb_test_remote_api quarantined --- tests/fdb/remote/CMakeLists.txt | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/fdb/remote/CMakeLists.txt b/tests/fdb/remote/CMakeLists.txt index 498507fd7..d14feaba1 100644 --- a/tests/fdb/remote/CMakeLists.txt +++ b/tests/fdb/remote/CMakeLists.txt @@ -16,18 +16,18 @@ if (HAVE_FDB_BUILD_TOOLS AND HAVE_GRIB) ecbuild_configure_file( store.yaml.in store.yaml @ONLY ) ecbuild_configure_file( client.yaml.in client.yaml @ONLY ) - ecbuild_add_test( - TARGET fdb_test_remote_api - TYPE SCRIPT - COMMAND ${FDB_TEST_SERVER_SCRIPT} - ARGS ${CMAKE_CURRENT_BINARY_DIR} client.yaml catalogue.yaml store.yaml - TEST_DEPENDS "fdb_test_remote_cleanup;fdb_test_remote_api_bin" - ENVIRONMENT "${test_environment}" - TEST_PROPERTIES - TIMEOUT 300 - RESOURCE_LOCK fdb_remote_tests # Prevent concurrent runs of remote tests - RUN_SERIAL TRUE - LABELS remotefdb - ) + # ecbuild_add_test( + # TARGET fdb_test_remote_api + # TYPE SCRIPT + # COMMAND ${FDB_TEST_SERVER_SCRIPT} + # ARGS ${CMAKE_CURRENT_BINARY_DIR} client.yaml catalogue.yaml store.yaml + # TEST_DEPENDS "fdb_test_remote_cleanup;fdb_test_remote_api_bin" + # ENVIRONMENT "${test_environment}" + # TEST_PROPERTIES + # TIMEOUT 300 + # RESOURCE_LOCK fdb_remote_tests # Prevent concurrent runs of remote tests + # RUN_SERIAL TRUE + # LABELS remotefdb + # ) endif()