Repository navigation
test(spanner): unflake ITBulkConnectionTest.testBulkCreateConnectionsMultiThreaded - #14610
Merged
Merged
Conversation
…MultiThreaded Ensure ExecutorService in ITBulkConnectionTest.testBulkCreateConnectionsMultiThreaded is always shut down in a try-finally block if the test fails, and use JUnit assertTrue/assertNotNull assertions.
sakthivelmanii
enabled auto-merge (squash)
October 8, 2026 17:03
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the multithreaded connection test in ITBulkConnectionTest.java to ensure proper cleanup of the ExecutorService using a try-finally block, while also updating some assertions to standard JUnit style. The review feedback recommends adding a null check for the executor and properly handling the potential InterruptedException during awaitTermination in the finally block to avoid swallowing the exception.
olavloite
approved these changes
Oct 8, 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.
Summary
Follow-up to #14604 to address review feedback on
ITBulkConnectionTest.testBulkCreateConnectionsMultiThreaded:ExecutorServiceexecution in atry-finallyblock callingexecutor.shutdownNow()andexecutor.awaitTermination(5L, TimeUnit.SECONDS)if the executor has not terminated when the test exits.assertTrue(..., executor.awaitTermination(60L, TimeUnit.SECONDS))and use JUnitassertTrue/assertNotNullassertions inside the worker task.