Merged
Conversation
Demonstrates that calling Timeouts.shutdown() (as GenericContainer.stop() does in this PR) permanently kills the static shared ExecutorService, causing all subsequent Timeouts usage to fail with RejectedExecutionException. This breaks any test suite that stops one container and then starts another. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the static final ExecutorService with a lazily-created one so that shutdown() doesn't permanently break subsequent container operations. The executor is re-created transparently on next use. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5195ec7 to
d17370b
Compare
dadoonet
approved these changes
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@dadoonet I'm not sure if you're still tracking this PR but I wanted to lend a hand. There seems to be a subtle bug in your fix - as the executor service is a singleton, shutting it down from
GenericContainercauses any future attempts to use timeouts to fail.This PR-to-your-PR adds a test demonstrating the problem (d506b0c) and a tweak so that we still shut down the executor but replace it with a fresh one (d17370b).
We could merge this in to your PR or directly into origin - your choice 🙇