jetty / jetty/jetty.project

Flaky test: RedispatchPlansTests.testRedispatch() — fails in 28% of CI builds

Open
#14,907 0 comments 0 reactions 0 assignees View on GitHub
flaky-test
Dominant language
Java
Stars
4.1k
Forks
2k
Avg merge
3d 56m
Merged PRs (30d)
48

Description

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

**Jetty Environment**
ee10 (cross-context dispatch)

**Java version/vendor**
JDK 17, 21, 25

**OS type/version**
Linux (Jenkins CI)

**Description**

`RedispatchPlansTests.testRedispatch()` is a 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 **17 builds (28%)**.

The test starts a Jetty distribution with all EE environments and sends a request to `/ccd-ee10/redispatch/ee10`. It intermittently receives a `404 Not Found` instead of the expected `200 OK`, suggesting the ee10 webapp is not fully deployed when the request is sent.

**Typical failure:**

```
java.lang.AssertionError:
HttpContentResponse[HTTP/1.1 404 Not Found - 489 bytes]
URI: http://localhost:/ccd-ee10/redispatch/ee10
STATUS: 404
MESSAGE: Not Found
SERVLET: default

Expected: is <200>
but: was <404>
at RedispatchPlansTests.testRedispatch(RedispatchPlansTests.java:114)
```

**Frequency data (from Jenkins flaky test report):**

- 17 out of 60 builds affected (28% failure rate)
- Consistently present across the entire build history of the job

**Likely related:**

`RedispatchTests.testEe8FilterWithAwkwardRequestURI()` shows a very similar pattern (503 instead of 200) with 45% failure rate. Both may share the same root cause — a race between webapp deployment and test request dispatch in cross-context dispatch tests.

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.