Skip to content

Flaky test: RedispatchTests.testEe8FilterWithAwkwardRequestURI() β€” fails in 45% of CI buildsΒ #14906

Closed

Description

@olamy

Jetty version(s)
12.1.x (12.1.8-SNAPSHOT through 12.1.9-SNAPSHOT)

Jetty Environment
ee8 (cross-context dispatch)

Java version/vendor
JDK 17, 21, 25 (all affected)

OS type/version
Linux (Jenkins CI)

Description

RedispatchTests.testEe8FilterWithAwkwardRequestURI() is the most frequently flaky test on the jetty-12.1.x CI branch. Over the last 60 builds (#1181–#1240), it failed as a flaky failure in 27 builds (45%).

The test starts a Jetty distribution with all EE environments deployed (ee8, ee9, ee10, ee11) and sends an HTTP request to /ccd-ee8/forwardto/ee8. It intermittently receives a 503 Service Unavailable instead of the expected 200 OK, suggesting the ee8 webapp is not fully started when the test sends its request.

Typical failure:

java.lang.AssertionError:
HttpContentResponse[HTTP/1.1 503 Service Unavailable - 473 bytes]
URI: http://localhost:<port>/ccd-ee8/forwardto/ee8
STATUS: 503
MESSAGE: Service Unavailable

Expected: is <200>
     but: was <503>
  at RedispatchTests.testEe8FilterWithAwkwardRequestURI(RedispatchTests.java:95)

Frequency data (from Jenkins flaky test report):

  • 27 out of 60 builds affected (45% failure rate)
  • Consistently present across the entire build history of the job
  • Failures occur on all JDK versions (17, 21, 25)

Possibly related:

RedispatchPlansTests.testRedispatch() is also flaky (17 out of 60 builds, 28%) with a similar pattern β€” the ee10 context returns 404 Not Found, also suggesting webapps not fully initialized when the test request is sent.

Jenkins job: https://jenkins.webtide.net/job/jetty.project/job/jetty-12.1.x/

Activity

  1. DragonFSKY commented on Aug 18, 2026

    @DragonFSKY
    Contributor

    I took a look at this and was able to reproduce the 503 locally. It appears to be caused by RedispatchTests and RedispatchPlansTests extracting the same WAR in parallel into separate test bases through JettyHomeTester.unzip(). The second ZipFS mount can throw FileSystemAlreadyExistsException, and the existing concurrency fallback then returns before that test's output directory has been populated.

    I have prepared a small fix that serializes JettyHomeTester.unzip() through extraction and ZipFS close, and the target tests pass with the existing parallel execution. I plan to open a focused PR for #14906 shortly; any feedback on this approach would be welcome.

  2. added a commit that references this issue on Aug 19, 2026
  3. added a commit that references this issue on Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions