test(gax-grpc): run the full unit test suite in CI - #14573
Open
macastelaz wants to merge 3 commits into
Open
macastelaz wants to merge 3 commits into
macastelaz wants to merge 3 commits into
Conversation
The Surefire <test> value in gax-grpc ended with an entry without a "!", which Surefire treats as an inclusion pattern, so only InstantiatingGrpcChannelProviderTest#testLogDirectPathMisconfigWrongCredential ran. Drop the stray inclusion and keep both existing exclusions. Also make testLogDirectPathMisconfigWrongCredential independent of the machine's GOOGLE_CLOUD_DISABLE_DIRECT_PATH by setting an empty env provider. Fixes googleapis#14572
Contributor
There was a problem hiding this comment.
Code Review
This pull request enables the testLogDirectPathMisconfigWrongCredential test to run by default in the Maven Surefire plugin configuration. To support this, the test setup in InstantiatingGrpcChannelProviderTest.java has been updated to mock the environment provider with .setEnvProvider(name -> null), removing its dependency on external environment variables. There are no review comments, so no additional feedback is provided.
Mockito can't subclass @NullMarked classes on JDK 8 because JSpecify's @target includes ElementType.MODULE. The spy was never verified, so use a plain instance. This test was previously skipped by the surefire config.
lqiu96
approved these changes
Oct 2, 2026
This branch has not been deployed
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.
Fixes #14572.
The Surefire
<test>value in gax-grpc ended with an entry without a!. Surefire treats that as an inclusion pattern, so onlyInstantiatingGrpcChannelProviderTest#testLogDirectPathMisconfigWrongCredentialran in CI.gax-grpc/pom.xml: drop the stray inclusion and keep both existing exclusions.InstantiatingGrpcChannelProviderTest#testLogDirectPathMisconfigWrongCredential: set.setEnvProvider(name -> null), so the test no longer depends on the machine'sGOOGLE_CLOUD_DISABLE_DIRECT_PATH. With it set totrue, the test fails because the provider takes the "DirectPath disabled" branch. It passed on GitHub runners only because the variable isn't set there.Testing:
mvn test -pl gax-grpcnow runs 209 tests, all passing, locally on JDK 21. Before, it ran 1.