Skip to content

Fix ExecutorService leak in WS-RM oneway tests#2963

Merged
coheigea merged 1 commit into
mainfrom
fix-wsrm-executor-leak
Jul 24, 2026
Merged

Fix ExecutorService leak in WS-RM oneway tests#2963
coheigea merged 1 commit into
mainfrom
fix-wsrm-executor-leak

Conversation

@gnodet

@gnodet gnodet commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • DeliveryAssuranceOnewayTest and MessageCallbackOnewayTest create ExecutorService instances via Executors.newSingleThreadExecutor() in their *AsyncExecutor test methods but never shut them down
  • The leaked non-daemon threads prevent clean test completion, causing intermittent timeouts in CI (~95-100s for DeliveryAssurance, ~75s for MessageCallback)
  • Fix: track the ExecutorService in an instance field and shut it down in tearDown() with a 10-second grace period before forceful termination

Test plan

  • CI passes without WS-RM oneway test timeouts
  • Both DeliveryAssuranceOnewayTest and MessageCallbackOnewayTest complete within their 60s timeout

🤖 Generated with Claude Code

DeliveryAssuranceOnewayTest and MessageCallbackOnewayTest create
ExecutorService instances via Executors.newSingleThreadExecutor() but
never shut them down. The leaked non-daemon threads prevent clean test
completion, causing intermittent timeouts in CI (~95-100s for
DeliveryAssurance, ~75s for MessageCallback).

Track the ExecutorService and shut it down in tearDown() with a
10-second grace period before forceful termination.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet added the bug label Mar 12, 2026
@gnodet
gnodet marked this pull request as ready for review March 12, 2026 18:01
@coheigea

Copy link
Copy Markdown
Contributor

I tried this locally and it doesn't seem to solve the flakiness of the tests

@coheigea coheigea left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to help somewhat, even though it doesn't fix all the issues, so let's just merge.

@coheigea
coheigea merged commit 5ec1123 into main Jul 24, 2026
4 checks passed
@coheigea
coheigea deleted the fix-wsrm-executor-leak branch July 24, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants