Skip to content

test: stop retrying a dev loop start that keeps timing out - #27681

Merged
mcollovati merged 5 commits into
mainfrom
test/devloop-fail-fast-hung-start
Dec 4, 2026
Merged

mcollovati merged 5 commits into
mainfrom
test/devloop-fail-fast-hung-start

Conversation

@mcollovati

Copy link
Copy Markdown
Contributor

Depends on #27590

build failure · flow-tests · the nightly dev loop build when one server cannot start

When a dev loop fixture's server does not start, every test in that fixture waits the full 5 minutes for vaadin-dev start and then fails. In the nightly build on bender, Payara Server never starts, so its tests use the rest of the 3-hour timeout and payara-micro never runs. Now, after two starts in a row time out, the next ones fail at once with the last start's output.

Risks:

  • ⚠️ Behaviour change in the tests: after two timed-out starts, the rest of that fixture's execution does not try to start the server again, even if it would have started later. One timeout is still retried, for a first start that is slow once.
  • ✅ Test code only. Nothing is skipped: the tests still fail, so a server that cannot start stays visible in the report.

Context. Every dev loop IT starts the application before it does anything, and the CLI driver kills a command after 5 minutes. A server that hangs on boot hangs again in the next test, so retrying only adds 5 minutes per test: in the nightly build of 2026-12-04, Payara used 30 minutes for DevLoopApplyIT and 25 for DevLoopBrowserIT, with about 30 more tests to go.

  • VaadinDevCli counts, per application, the start commands in a row that did not finish in time, and after two it fails every later start of that application at once, with what the last one said
    • A start that finishes in time resets the count
    • Only a timeout counts: a start that exits with an error is already fast, and some tests start again after a stop on purpose
    • The count lasts as long as the test JVM, which is one failsafe execution of one fixture, so the maven-compile execution and the other fixtures try again

…s set

Bender agents have Chrome 115, which Vaadin no longer supports. The JUnit 4 tests already use the hub there; the JUnit 6 base class always started the local Chrome. The dev loop fixtures let dev tools connect from any host, since the hub browser is on another machine.
@mcollovati

Copy link
Copy Markdown
Contributor Author

Type of change

  • Tests
Test coverage

There is no IT for this: it would need a server that hangs on boot for 5 minutes. I checked it with a small program in the same package that drives VaadinDevCli against a fake .vaadin/vaadin-dev script, whose start prints a line and then sleeps while a marker file exists:

start 1 (server hangs: true)  after 300.0 s: failed: vaadin-dev start did not finish in 5 minutes
start 2 (server hangs: false) after   0.1 s: exit 0
start 3 (server hangs: true)  after 300.0 s: failed: vaadin-dev start did not finish in 5 minutes
start 4 (server hangs: true)  after 300.0 s: failed: vaadin-dev start did not finish in 5 minutes
start 5 (server hangs: true)  after   0.0 s: failed: vaadin-dev start was not tried: the last 2 starts of …/app did not finish in 5 minutes in this test run. The last one said: …

One timeout is retried (start 2), a start that finishes resets the count (start 3 and 4 are both tried), and after two in a row the next start fails at once (start 5). No fake server process was left running.

The ITs of the fixtures do not change when the server starts, because nothing is remembered unless a start times out.

Why the nightly build timed out

Nightly build #8 on 2026-12-04, run with the hub support from #27590: spring, jetty, cargo, tomee, jbosseap and liberty passed in 50 minutes. Payara Server then did not start; every test failed with vaadin-dev start did not finish in 5 minutes (6 × 5 minutes in DevLoopApplyIT, then 5 × 5 in DevLoopBrowserIT), and about 30 more Payara tests were left before the 3-hour timeout. Why Payara does not start on the agent is a separate problem; its app.log is in the build's devloop-logs.zip.

@github-actions github-actions Bot added the +0.0.1 label Dec 4, 2026
@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

 1 662 files  ±0   1 753 suites  ±0   1h 46m 19s ⏱️ - 5m 21s
14 142 tests ±0  14 070 ✅ ±0  72 💤 ±0  0 ❌ ±0 
14 578 runs  ±0  14 506 ✅ ±0  72 💤 ±0  0 ❌ ±0 

Results for commit 52188c2. ± Comparison against base commit b56e711.

♻️ This comment has been updated with latest results.

mshabarov and others added 3 commits December 4, 2026 12:27
- JBoss EAP listens on all interfaces, so a browser on the hub can
  reach it
- The remote driver gets the same headless Chrome options as the local
  one, and falls back to localhost when no hub host name is set
- rootUrl() moved below contextPath() so its Javadoc is in place again
- The test-devloop README says how to run the browser ITs on a hub

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After two starts of an application in a row run into the 5 minute
command timeout, later starts in the same test JVM fail at once with the
last start's output, so one server that cannot boot no longer uses up
the CI step's timeout.
@mcollovati
mcollovati force-pushed the test/devloop-fail-fast-hung-start branch 2 times, most recently from 4db2de8 to 42b585d Compare December 4, 2026 14:11
@mcollovati
mcollovati marked this pull request as ready for review December 4, 2026 14:13
@vaadin-bot

Copy link
Copy Markdown
Collaborator

@mcollovati this "chore:"/"test:"/"refactor:" PR has been approved automatically, but auto merge has not been enabled for it. You can enable the auto merge by yourself, or ask another member for another review. [Message is sent from bot]

Base automatically changed from ci/devloop-browser-hub to main December 4, 2026 14:34
@mcollovati
mcollovati dismissed vaadin-review-bot’s stale review December 4, 2026 14:34

The base branch was changed.

@mcollovati
mcollovati enabled auto-merge December 4, 2026 14:57
@vaadin-bot

Copy link
Copy Markdown
Collaborator

@mcollovati this "chore:"/"test:"/"refactor:" PR has been approved automatically, but auto merge has not been enabled for it. You can enable the auto merge by yourself, or ask another member for another review. [Message is sent from bot]

@sonarqubecloud

sonarqubecloud Bot commented Dec 4, 2026

Copy link
Copy Markdown

@mcollovati
mcollovati added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit 3a9144f Dec 4, 2026
56 checks passed
@mcollovati
mcollovati deleted the test/devloop-fail-fast-hung-start branch December 4, 2026 15:30
vaadin-bot added a commit that referenced this pull request Dec 4, 2026
…CP: 25.4) (#27687)

This PR cherry-picks changes from the original PR #27681 to branch 25.4.

---

> Depends on #27590
> 
> **build failure** · flow-tests · the nightly dev loop build when one
server cannot start
> 
> When a dev loop fixture's server does not start, every test in that
fixture waits the full 5 minutes for `vaadin-dev start` and then fails.
In the nightly build on bender, Payara Server never starts, so its tests
use the rest of the 3-hour timeout and payara-micro never runs. Now,
after two starts in a row time out, the next ones fail at once with the
last start's output.
> 
> **Risks:**
> - ⚠️ Behaviour change in the tests: after two timed-out starts, the
rest of that fixture's execution does not try to start the server again,
even if it would have started later. One timeout is still retried, for a
first start that is slow once.
> - ✅ Test code only. Nothing is skipped: the tests still fail, so a
server that cannot start stays visible in the report.
> 
> **Context.** Every dev loop IT starts the application before it does
anything, and the CLI driver kills a command after 5 minutes. A server
that hangs on boot hangs again in the next test, so retrying only adds 5
minutes per test: in the nightly build of 2026-12-04, Payara used 30
minutes for `DevLoopApplyIT` and 25 for `DevLoopBrowserIT`, with about
30 more tests to go.
> 
> - `VaadinDevCli` counts, per application, the `start` commands in a
row that did not finish in time, and after two it fails every later
`start` of that application at once, with what the last one said
>   - A start that finishes in time resets the count
> - Only a timeout counts: a start that exits with an error is already
fast, and some tests start again after a `stop` on purpose
> - The count lasts as long as the test JVM, which is one failsafe
execution of one fixture, so the `maven-compile` execution and the other
fixtures try again
>

Co-authored-by: Marco Collovati <marco@vaadin.com>
Co-authored-by: mikhail <mikhail@vaadin.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants