build: enable build cache and parallel execution, and harden async timing tests#103
Merged
OmarAlJarrah merged 3 commits intoJun 16, 2026
Merged
Conversation
…timeouts
Turn on org.gradle.caching and org.gradle.parallel in gradle.properties to
reuse task outputs across builds and run independent modules' tasks
concurrently. (org.gradle.configuration-cache is left off and handled
separately.)
Parallel execution runs several modules' test tasks at once, which
oversubscribes CPU cores. The async adapter test suites
(sdk-async-coroutines, sdk-async-reactor, sdk-async-netty,
sdk-async-virtualthreads) used tight 2-5s deadlines on operations that are
expected to complete promptly — future.get(2, SECONDS), withTimeout(2000),
Future.await(2, SECONDS), Mono.block(ofSeconds(2)), and the like. Those
deadlines exist only to stop a stuck test from hanging; they are not the
behaviour under test, but they assume near-dedicated cores and time out under
parallel load. Replace each with a generous per-module FAILSAFE_TIMEOUT
constant (30s): a healthy test still returns the instant its work finishes, so
only a genuinely-stuck test is affected. Semantic timings are left untouched —
coroutine delay(...) calls, Thread.sleep simulating work, Netty's
shutdownGracefully(0, 0, SECONDS) quiet period, and the SSE retry-hint value
under assertion.
Document the cross-compile toolchain rule in docs/architecture.md: a module
that targets a newer JDK must override both jvmToolchain(N) and
compilerOptions { jvmTarget.set(JvmTarget.JVM_N) }. Overriding only the
toolchain compiles against the newer standard library while emitting
Java-8-format bytecode, producing NoSuchMethodError on a Java 8 runtime. The
section is grounded in the existing sdk-transport-jdkhttp (11) and
sdk-async-virtualthreads (21) overrides and notes the --release guard that a
future single-toolchain consolidation would require.
…ipline
CLAUDE.md described the cross-compile override as 'both jvmToolchain and
compilerOptions { jvmTarget }', omitting the java {} block that the build
scripts and docs/architecture.md require. State all three overrides and
point at the architecture-doc section. Also fix a missing paragraph break
in that section so the two paragraphs render separately.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enables
org.gradle.caching=trueandorg.gradle.parallel=true, and hardens the async test suites so parallel execution is stable.Why the test changes ship with the flag
Parallel project execution runs modules'
testtasks concurrently, which oversubscribes CPU cores. The four async test modules had ~20 tight wall-clock failsafe deadlines —future.get(2, TimeUnit.SECONDS),withTimeout(2000), Nettyawait(2, TimeUnit.SECONDS), Reactorblock(ofSeconds(2)), etc. — that exist only to keep a test from hanging on success. They assume near-dedicated cores and intermittently time out under the contention parallel execution creates (and would also flake on slow shared CI runners, independent of parallel). So enabling parallel requires hardening them, and the two changes belong together.Each such failsafe is raised to a generous shared constant (30 s) per module. A passing test returns immediately, so this changes no timing semantics — it only affects a test that is genuinely stuck. Deadlines that are semantic are deliberately left unchanged: coroutine
delay(...)durations, the Netty graceful-shutdown quiet period, the SSEretry:hint value under assertion, and any deadline that is itself the behavior under test.Also
Documents the cross-compile toolchain discipline in
docs/architecture.md(#76): a module targeting a newer JDK must override bothjvmToolchain(N)andcompilerOptions { jvmTarget }, since overriding only the toolchain emits Java-8 bytecode against newer stdlib symbols (NoSuchMethodErroron JDK 8).Validation
Ran the full build three times with parallel + cache on — twice with
--rerun-tasksto force the async tests to genuinely re-execute concurrently rather than be served from cache — all threeBUILD SUCCESSFUL.Closes #74
Closes #76