Skip to content

Fix flaky CI: TestSchedulerWithTimer margin, Oracle JDK matrix, missing PGP keys - #6848

Merged
vlsi merged 3 commits into
apache:masterfrom
rebelwithoutacause:fix-flaky-scheduler-with-timer
Oct 30, 2026
Merged

vlsi merged 3 commits into
apache:masterfrom
rebelwithoutacause:fix-flaky-scheduler-with-timer

Conversation

@rebelwithoutacause

@rebelwithoutacause rebelwithoutacause commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

batchTestSchedulerWithTimer failed on macOS / JDK 25 in CI run 40919458824:

WARN o.a.j.p.j.s.J.JSRCheckDuration: Duration 7338 exceeded expected duration of 7000

The tearDown check measures time from the setUp sampler, so the 2s margin over the 5s scheduler duration also has to cover setUp thread exit, the forced GC before the main groups start, thread start and join, the tearDown group starting, and Groovy compilation of the check script. On slow CI workers this overhead can go past 2s.

The engine itself behaves correctly: JMeterThread.delay() and TestAction cap their sleeps at the scheduler end time via TimerService.adjustDelay.

Change

  • Raise the margin from 2s to 5s (limit 10s). If the scheduler stops interrupting the 20s pauses (Bugs 60797, 60049), the check still fails clearly.
  • Update the test plan comment to explain the margin.

The expected .csv/.xml outputs are unchanged.

CI: Oracle JDK only for Java 25+

The CI run for this PR then failed in "Set up Java 21, oracle" (Checksum not available for: https://download.oracle.com/java/21/latest/jdk-21_windows-x64_bin.zip). Oracle no longer serves the "latest" builds of JDK 17 and 21 because their no-fee license has ended, and both the archive and .sha256 URLs now return 404. JDK 25 is still served. matrix.mjs now pairs oracle only with Java 25 and later. In 200 generated matrices, Oracle came up 44 times, always with Java 25.

Build: add missing keys to the verification keyring

Another job then failed in dependency verification for :src:dist:nodeSetup, with Artifact was signed with key '4DB5EA09F2E3C800' but it wasn't found in any key server so it couldn't be verified and the same error for other POMs. verification-metadata.xml trusts the AssertJ (0CC0B712FEE75827), Azure SDK (8D5DB0BAA89FE87B), gRPC (D9C565AA72BA2FDD) and Jetty (4DB5EA09F2E3C800) signing keys, but none of them were in verification-keyring.keys. That forced a key server download, which fails when the servers are unreachable. The four keys are now in the keyring at their sorted positions. Their fingerprints match the trusted IDs, and no existing entries changed.

Testing

  • ./gradlew :src:dist-check:batchTestSchedulerWithTimer passes locally (Windows, JDK 21).

🤖 Generated with Claude Code

rebelwithoutacause and others added 2 commits October 30, 2026 07:58
The tearDown duration check measured from the setUp sampler, so the 2s
margin also had to absorb thread start/stop, a forced GC and Groovy
compilation. Slow macOS CI workers exceeded it (7338ms > 7000ms).

Raise the margin to 5s: a 10s limit still clearly detects the scheduler
failing to interrupt the 20s pauses (Bugs 60797, 60049).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
download.oracle.com no longer serves the "latest" JDK 17 and 21 builds
(the no-fee license for them has ended), so matrix jobs that picked
oracle with Java 21 failed in "Set up Java" with a 404 checksum error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rebelwithoutacause rebelwithoutacause changed the title test: make TestSchedulerWithTimer less timing-sensitive test: fix flaky TestSchedulerWithTimer; ci: use Oracle JDK only for 25+ Oct 30, 2026
verification-metadata.xml trusts the AssertJ, Azure SDK, gRPC and Jetty
signing keys, but they were absent from verification-keyring.keys, so
Gradle had to download them from key servers at build time. When the
servers were unreachable, dependency verification failed in CI:

  Artifact was signed with key '4DB5EA09F2E3C800' but it wasn't found
  in any key server so it couldn't be verified

Add the keys (fingerprints match the trusted ids) so verification no
longer depends on key server availability.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rebelwithoutacause rebelwithoutacause changed the title test: fix flaky TestSchedulerWithTimer; ci: use Oracle JDK only for 25+ Fix flaky CI: TestSchedulerWithTimer margin, Oracle JDK matrix, missing PGP keys Oct 30, 2026
@vlsi
vlsi merged commit f31fb25 into apache:master Oct 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants