Skip to content
resilience4cata

How it is tested

What is checked before and after a change reaches main, what each check verifies, and what the pipelines reported. Every number on this page comes from a GitHub Actions run, SonarCloud's analysis of main, or a benchmark run on AWS. None comes from a developer's machine. The data is as of 2026-12-01.

Each check is one Gradle command that also runs locally. The workflow files in .github/workflows/ give the command at the top.

At a glance

Check What it verifies When
build Every module's tests on JDK 21 and 25, the javadoc, and code generated by the last release's processor on the new runtime Every PR and merge
alloc-gate Bytes allocated per call stay within budget (0 B/op on sync success and rejection paths) Every PR and merge
sonar Coverage and static analysis Every PR and merge
consumer The published artifacts, installed as a user does, with Gradle and Maven PRs and merges that change what is published
native Four applications compiled to GraalVM native images, with their tests run inside the images PRs that touch the runtime, every merge, nightly
stress The lock-free policies under jcstress, on x86 and ARM Every merge, nightly; longer runs weekly
fuzz The seeded model and fuzz tests, with new seeds Nightly
platforms The whole build on Windows, macOS, the latest JDK and the next early-access JDK Weekly
mutation Whether core's tests detect changes PIT makes to core's code Weekly
soak Two hours of load, looking for anything that grows Weekly
AWS benchmarks Time and allocation per call against Resilience4j, tails under contention, services under a CPU limit Before a release, or when a change touches a hot path

On every pull request and merge

build

./gradlew build -PtestJdk=<21|25> compiles every module with -Xlint:all -Werror (generated code included), runs the tests and builds the javadoc, once on JDK 21 and once on JDK 25. A third job, generated code (last release), compiles the example tests with the last release's annotation processor and runs them on the new runtime. This is the compatibility rule that code generated by 1.a runs on 1.b.

The pipelines publish the JUnit reports only when a job fails. The latest full set comes from the JDK 28 early-access job of platforms on 2026-12-01 (commit bd2ee17), which ran every test task (--continue). Tests per module:

Module Tests What they cover
examples 2 150 End to end, through real generated code: every policy, Mono and Flux, documentation snippets, the Reactive Streams TCK for the generated publishers, BlockHound
reactor 905 Mono and Flux support, Pipeline operators, the one-element Flux against Mono differential test
core 484 Every policy, including the model tests that compare each one with a small reference model, seed after seed
processor 222 Code generation, compile-time errors, the processor fuzz test
spring 155 Spring Boot integration
config 146 Properties, environment and system properties, the configuration fuzz test
quarkus/it 116 Quarkus extension and application
micronaut 105 Micronaut integration
testkit, junit, micrometer, opentelemetry, site, stress, native/* 146 Test helpers, metrics, the documentation site, Lincheck, and the native applications on the JVM
Total 4 429

reactor, spring, micronaut, junit and opentelemetry run their tests a second time against the oldest supported version of their framework, which brings the run to 5 630 test executions. 132 of the examples tests are rules the Reactive Streams TCK reports as not verifiable, so they are skipped. These counts are from before #164 and #165, which added 4 and 41 tests.

alloc-gate

./gradlew :benchmark:allocationCheck runs every benchmark listed in benchmark/allocation-budgets.properties under JMH's GC profiler, in three forks, and fails if a benchmark allocates its budget or more per call. Time on shared runners is noise; bytes per call are not, so only bytes gate. There are 64 budgets, and 33 of them are 0 B/op: every sync success and rejection path. Async paths allocate their futures and have measured budgets. How the gate works and why it uses three forks: Allocation gate.

sonar

./gradlew build -Pcoverage :examples:testCodeCoverageReport sonar measures coverage over the unit and end-to-end tests and sends it to SonarCloud. The analysis of main at 51bf47a (2026-12-01):

Measure Value
Coverage 90.8 %
Line coverage 94.5 %
Branch coverage 84.7 %
Vulnerabilities 0
Security hotspots 0
Quality gate Passed
Lines of code 21 757

consumer

consumer/check.sh publishes every module to a local staging directory and checks that the BOM lists exactly what is published. It then builds and runs a small application that depends on those artifacts, with Gradle (class path and module path) and with Maven, under -Xlint:all -Werror. The build's own tests use project dependencies, so this is the only check that reads the POMs, the Gradle module metadata and the BOM. release.yml runs the same script on the bundle before uploading it.

native

GraalVM native images of four applications, with their tests run inside the image:

  • the Quarkus guide's application (quarkus:it);
  • a Spring Boot and a Micronaut application (native:spring, native:micronaut): an annotated class, a wrapped interface, YAML configuration, health, metrics, the endpoint, and Mono and Flux methods;
  • a plain Java application with no framework (native:java), where only the library's own metadata makes it work.

A fifth job, native (footprint), measures what the library adds to an image. It starts each image 10 times next to the same application built without resilience4cata. The nightly run of 2026-11-30 (medians):

Application Image Startup RSS after start RSS after 2 000 requests
Spring Boot, with minus without +1.9 MB +16 ms +9.2 MB +7.0 MB
Micronaut, with minus without +1.9 MB +10 ms +4.7 MB +2.6 MB

The footprint is a report, not a gate. What the measurement includes: Native image footprint.

Other checks

  • actionlint checks every workflow file when one changes.
  • site builds the documentation and checks that every page of every language renders and every generated link points at a page that exists.
  • In build, DocsTest checks that every Java block in the user pages compiles from a tagged region of the example tests, and that every translation has the English pages and headings ids.

After every merge and nightly

stress

The lock-free policies have jcstress tests: 68 tests that run the same operations on several threads at once and check every outcome the memory model allows. They run on x86 and on ARM. On x86, which is TSO, a weakened memory ordering cannot fail; ARM reorders more, and the library is tuned for it. After every merge to main and nightly, in quick mode:

Run Machine Results Failed
main at 8a88a39, 2026-12-01 x64 2 406 0
arm64 1 092 0

stress-default runs the default mode weekly, in three shards per machine: about 170 minutes per x64 shard and 60 minutes per ARM shard. The run of 2026-11-28 had 5 994 results on x64 and 2 700 on ARM, none failed. stress-mutants, run by hand after a change to a lock-free policy, weakens one guard in core at a time and checks that a jcstress group catches it.

./gradlew :stress:test also runs Lincheck model checking, as part of build.

fuzz

The seeded tests run in build with fixed seeds. Every night they run again from a new seed (the run's time in ms), with many more cases:

Suite What each seed does Per night Duration (2026-11-29)
models Drives a policy and a small reference model through the same random operations, comparing them after each step 100 × the build's seeds 10.5 min
processor fuzz Compiles random annotated sources and checks the result 30 000 sources 15.5 min
config fuzz Reads random settings from random sources, checks them against a model, and damages them 1 000 000 seeds 5.0 min
flux fuzz Sends 300 overlapping callers through a random Flux pipeline whose rate limiter and bulkhead may wait; the callers ask for little and cancel 10 000 seeds from 2026-12-02

A failure names its seed and the command that replays it. A seed that finds a bug becomes a fixed test, so the build keeps it.

Weekly

platforms

The whole build on Windows and macOS, on the latest JDK (27), and on the next early-access build (28-ea). Paths, line ends, environment variables, the clock and thread scheduling differ there. The JDK 28-ea job shows its result without failing the workflow. Its failures come from test tools that do not support it yet (BlockHound, Spring's CGLIB proxies, Quarkus's dev mode), while the library's own tests pass.

mutation

PIT changes core's compiled code one small change at a time (a condition reversed, a return value replaced, a call removed) and runs core's tests against each change. Every change that no test detects is listed in the job summary. The weekly run of 2026-11-29 took 10 minutes:

Measure Value
Mutants 2 053
Detected by a test 1 664 (81.1 %)
Not detected 297
Not reached by any test 92
Detected among the mutants the tests reach (test strength) 84.9 %
Line coverage of the mutated classes 92 % (3 719 of 4 038)
Tests run 12 017

It is a report, not a gate. New race tests are also checked by hand against mutants of the code they guard, as the project's rules require.

soak

./gradlew :examples:soakTest runs every policy for two hours on real clocks, on JDK 21 and 25: sync, async, Mono, Flux and a Pipeline, with backends that answer, fail, answer late or never, a storm of failures one second in four, and callers that cancel. About 60 times during the run it samples the heap after a full GC, the library's threads, the timer tasks, the meters and the registry instances. What it checks: Soak test. The run of 2026-11-29:

JDK 21 JDK 25
Calls 44 030 992 44 012 184
Events 55 419 386 55 021 950
Heap after GC, start → end 9.6 → 9.6 MB 9.9 → 10.0 MB
Checks passed all all

Among the checks: every async call ended, no timer task, bulkhead slot or adaptive-limit permit was left, the timeout watchdog forgot every dead thread, no new library thread or registry instance appeared, every meter and OpenTelemetry series belongs to a registry instance, and Reactor dropped no error.

Measured on AWS

Time per call is measured with JMH on AWS rather than on shared CI runners, whose timing is noise. infra/bench.sh runs every benchmark on temporary c7g.xlarge machines (4 Graviton3 cores with a fixed clock) and compares two revisions on the same machine. A full run takes about 20 minutes and is destroyed at the end. How it works: Parallel runs on AWS.

Measured AWS c7g.xlarge (Graviton3), JDK 21, against Resilience4j 2.4.0 with equivalent configuration, nanoseconds per call with four threads. From Circuit breaker at realistic failure rates (2026-11-02) and Percentiles under contention (2026-11-12).

Scenario, four threads resilience4cata Resilience4j 2.4.0
Circuit breaker, every call succeeds 1.9 ns 807.8 ns
Circuit breaker, one call in 1 000 fails 11.2 ns 1 024.8 ns
Rate limiter, permits free, p99.9 110 µs 910 µs
Bulkhead, slots free, p99.9 555 ns 1.8 µs

Services under a CPU limit ran Spring Boot, Micronaut and Quarkus services on 1.0.0-RC4 for 10 minutes of load at 1 500 orders per second, with the backend down for a minute and slow for another. They ran without a limit and limited to 1 and 0.5 core. In every run, no timeout fired early, and the policies held their limits. Every result, with its setup: Performance and Benchmarks in depth.

Pipeline record

Runs from 2026-11-01 to 2026-12-01, from the GitHub Actions API. A cancelled run was replaced by a newer one; it did not fail. The duration is the median of the successful runs; a run that finds its tasks in Gradle's build cache takes less.

Workflow Runs Passed Failed Cancelled Median duration
build 271 254 5 11 7.5 min
alloc-gate 271 259 2 9 5.7 min
sonar 272 258 4 9 4.4 min
native 245 227 9 8 3.9 min
stress 158 88 1 68 61 min
consumer 95 92 2 1 1.4 min
site 76 75 1 0 1.1 min
actionlint 56 56 0 0 0.2 min
fuzz 21 18 3 0 13.5 min
platforms 14 6 8 0 20 min
release 9 9 0 0 21.4 min
mutation 6 6 0 0 6.5 min
soak 6 6 0 0 121 min
stress-default 5 4 0 1 171 min
stress-mutants 4 3 1 0 36 min
  • stress is cancelled whenever a newer push to main starts it again, which is most of its 68 cancellations.
  • platforms: the JDK 28 early-access job failed in all 8 failed runs, for the reasons above. Since 2026-12-01 that job no longer fails the workflow. macOS failed in 5 of them and Windows in 3. The latest macOS failure (2026-11-30) was a test whose timeout also counted the wait for a bulkhead slot, and #162 fixed it.
  • fuzz: all 3 failures were Gradle failing to download a plugin that only the native test projects use, before any test ran. The workflow has not depended on it since #162.
  • native: 6 of the 9 failures were in the footprint report job.

Every run is public in the repository's Actions tab.