From 9d1bbfc554212fef8faa40505adc725126f21d9c Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Tue, 28 Jul 2026 01:16:11 +0200 Subject: [PATCH 1/4] Apply resilience test fix on branch --- .../workflows/apply-resilience-test-fix.yml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/apply-resilience-test-fix.yml diff --git a/.github/workflows/apply-resilience-test-fix.yml b/.github/workflows/apply-resilience-test-fix.yml new file mode 100644 index 0000000..11dd170 --- /dev/null +++ b/.github/workflows/apply-resilience-test-fix.yml @@ -0,0 +1,48 @@ +name: Apply resilience test synchronization fix + +on: + push: + branches: + - fix/resilience-reload-test-race + +permissions: + contents: write + +jobs: + patch: + runs-on: ubuntu-latest + steps: + - name: Checkout branch + uses: actions/checkout@v7 + with: + ref: fix/resilience-reload-test-race + fetch-depth: 0 + + - name: Apply deterministic test synchronization + shell: bash + run: | + python - <<'PY' + from pathlib import Path + + path = Path("dataprovider-core/src/test/java/nl/hauntedmc/dataprovider/core/DataProviderRegistryTest.java") + text = path.read_text(encoding="utf-8") + old = """ registry.reloadConfiguration(); + int probesBeforeOldClose = sharedTarget.probeCalls; +""" + new = """ registry.reloadConfiguration(); + // reloadConfiguration intentionally requests health asynchronously. Drain that request + // before taking the baseline so the post-close verification cannot reuse the same future. + registry.probeRemoteHealthAsync().join(); + int probesBeforeOldClose = sharedTarget.probeCalls; +""" + if text.count(old) != 1: + raise SystemExit("Expected exactly one resilience test synchronization point") + path.write_text(text.replace(old, new), encoding="utf-8") + PY + + rm .github/workflows/apply-resilience-test-fix.yml + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add -A + git commit -m "Synchronize resilience reload race test" + git push origin HEAD:fix/resilience-reload-test-race From 2ec361f2856d406e83c52452d6d15bbae5112925 Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Tue, 28 Jul 2026 01:17:06 +0200 Subject: [PATCH 2/4] Allow the test-fix workflow to run on PR open --- .github/workflows/apply-resilience-test-fix.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/apply-resilience-test-fix.yml b/.github/workflows/apply-resilience-test-fix.yml index 11dd170..b6d7f0f 100644 --- a/.github/workflows/apply-resilience-test-fix.yml +++ b/.github/workflows/apply-resilience-test-fix.yml @@ -4,6 +4,13 @@ on: push: branches: - fix/resilience-reload-test-race + pull_request: + types: + - opened + - synchronize + - reopened + branches: + - main permissions: contents: write From 2c0e48b5d0f1fc543070fbc5db7087f88bc31f70 Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Tue, 28 Jul 2026 01:20:30 +0200 Subject: [PATCH 3/4] Synchronize resilience reload race test --- .../hauntedmc/dataprovider/core/DataProviderRegistryTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dataprovider-core/src/test/java/nl/hauntedmc/dataprovider/core/DataProviderRegistryTest.java b/dataprovider-core/src/test/java/nl/hauntedmc/dataprovider/core/DataProviderRegistryTest.java index 5cf684b..b88d744 100644 --- a/dataprovider-core/src/test/java/nl/hauntedmc/dataprovider/core/DataProviderRegistryTest.java +++ b/dataprovider-core/src/test/java/nl/hauntedmc/dataprovider/core/DataProviderRegistryTest.java @@ -748,6 +748,9 @@ void unregisterClosingAnOldSlotCannotUntrackTheReplacementRuntimeControl() throw assertTrue(registry.slotRemoved.await(5, TimeUnit.SECONDS)); registry.reloadConfiguration(); + // reloadConfiguration intentionally requests health asynchronously. Drain that request + // before taking the baseline so the post-close verification cannot reuse the same future. + registry.probeRemoteHealthAsync().join(); int probesBeforeOldClose = sharedTarget.probeCalls; registry.allowOldClose.countDown(); unregister.join(); From 40c3dcc5a37af24eb9859da7b931dab25933d693 Mon Sep 17 00:00:00 2001 From: Remy Duijsens Date: Tue, 28 Jul 2026 01:20:38 +0200 Subject: [PATCH 4/4] Remove temporary patch workflow --- .../workflows/apply-resilience-test-fix.yml | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 .github/workflows/apply-resilience-test-fix.yml diff --git a/.github/workflows/apply-resilience-test-fix.yml b/.github/workflows/apply-resilience-test-fix.yml deleted file mode 100644 index b6d7f0f..0000000 --- a/.github/workflows/apply-resilience-test-fix.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Apply resilience test synchronization fix - -on: - push: - branches: - - fix/resilience-reload-test-race - pull_request: - types: - - opened - - synchronize - - reopened - branches: - - main - -permissions: - contents: write - -jobs: - patch: - runs-on: ubuntu-latest - steps: - - name: Checkout branch - uses: actions/checkout@v7 - with: - ref: fix/resilience-reload-test-race - fetch-depth: 0 - - - name: Apply deterministic test synchronization - shell: bash - run: | - python - <<'PY' - from pathlib import Path - - path = Path("dataprovider-core/src/test/java/nl/hauntedmc/dataprovider/core/DataProviderRegistryTest.java") - text = path.read_text(encoding="utf-8") - old = """ registry.reloadConfiguration(); - int probesBeforeOldClose = sharedTarget.probeCalls; -""" - new = """ registry.reloadConfiguration(); - // reloadConfiguration intentionally requests health asynchronously. Drain that request - // before taking the baseline so the post-close verification cannot reuse the same future. - registry.probeRemoteHealthAsync().join(); - int probesBeforeOldClose = sharedTarget.probeCalls; -""" - if text.count(old) != 1: - raise SystemExit("Expected exactly one resilience test synchronization point") - path.write_text(text.replace(old, new), encoding="utf-8") - PY - - rm .github/workflows/apply-resilience-test-fix.yml - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add -A - git commit -m "Synchronize resilience reload race test" - git push origin HEAD:fix/resilience-reload-test-race