Skip to content

ci: cap the test job at 30 minutes - #58

Merged
elecharny merged 1 commit into
apache:2.2.Xfrom
ppkarwasz:ci/build-timeout
Nov 11, 2026
Merged

elecharny merged 1 commit into
apache:2.2.Xfrom
ppkarwasz:ci/build-timeout

Conversation

@ppkarwasz

@ppkarwasz ppkarwasz commented Jun 12, 2026 •

Copy link
Copy Markdown
Member

What

Adds a job-level timeout-minutes: 30 to the test job in the Java CI workflow.

Why

The test job had no timeout, so a hung or deadlocked test runs until GitHub's 6-hour default before the job fails (as seen on #57, where a test got into a deadlock). The purpose of the cap is only to prevent such runaway builds, so 30 minutes leaves ample margin for the slowest matrix cells. The current slowness of the Ubuntu jobs is addressed separately in #93.

The cap is job-level, so it applies to every OS/JDK matrix combination. When it fires, the if: always() "Upload test reports" step still runs, preserving whatever surefire output exists to help locate the hang.

🤖 Generated with Claude Code

@the-thing

Copy link
Copy Markdown
Member

I fixed the root cause of these long hanging macos tests in a separate PR, but this is a good change just in case something similar happens in the future.

Rationalizing in the comment is not necessary.

@the-thing

Copy link
Copy Markdown
Member

15 timeout might not be valid anymore. We added some more tests in #77 and it takes almost (sometimes more) 15 minutes.

https://github.com/apache/mina/actions/runs/37960280693/job/113921075461

Ubuntu runners seem to be a lot slower than Windows / Mac.

@ppkarwasz

Copy link
Copy Markdown
Member Author

Hi @the-thing,

The slow run on Linux is probably due to its TCP/IP stack, fixed in #93 by adding TCP_NO_DELAY.

That said, what would a reasonable timeout be? 30 minutes?

The test job had no timeout, so a hung or deadlocked test ran until GitHub's 6-hour default before failing. Cap the job at 30 minutes to prevent such runaway builds.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@ppkarwasz ppkarwasz changed the title ci: cap the test job at 15 minutes ci: cap the test job at 30 minutes Nov 11, 2026
@elecharny

Copy link
Copy Markdown
Contributor

Ubuntu/debian seems to have a weird way to handle small packet of data. Enabling the NAGLE algorithm does not seems necessary those days, but well, the test you have modified sends 4096 packet of 4 bytes, so I guess it takes a bit of time.

Setting the timeout to 30mins sounds reasonable.

@elecharny
elecharny merged commit 009badb into apache:2.2.X Nov 11, 2026
9 checks passed
@ppkarwasz
ppkarwasz deleted the ci/build-timeout branch November 12, 2026 00:43
@the-thing

Copy link
Copy Markdown
Member

Too late.

# Prevent runaway builds from running until the 6-hour GitHub default. - this comment was probably too obvious, but ok.

@elecharny

Copy link
Copy Markdown
Contributor

Yeah... But the next one will be ok ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants