Skip to content

gax-grpc: Surefire <test> pattern restricts the unit test run to a single test #14572

Description

@macastelaz

In sdk-platform-java/gax-java/gax-grpc/pom.xml, the Surefire configuration is:

<test>!InstantiatingGrpcChannelProviderTest#testLogDirectPathMisconfig_AttemptDirectPathNotSetAndAttemptDirectPathXdsSetViaEnv_warns,!InstantiatingGrpcChannelProviderTest#canUseDirectPath_directPathEnvVarNotSet_attemptDirectPathIsTrue,InstantiatingGrpcChannelProviderTest#testLogDirectPathMisconfigWrongCredential</test>

The last entry has no leading !. Surefire therefore treats it as an inclusion pattern: only InstantiatingGrpcChannelProviderTest#testLogDirectPathMisconfigWrongCredential runs, and the rest of the gax-grpc unit tests are skipped. This includes ChannelPoolTest, GrpcCallContextTest, GrpcClientCallsTest, and all other InstantiatingGrpcChannelProviderTest cases.

This seems to have been introduced when sdk-platform-java was migrated into the monorepo ("chore(sdk-platform-java): apply manual changes"). Before that, the line contained only the first exclusion.

Evidence: in the sdk-platform-java units job, gax-grpc reports Tests run: 1. The only test class run is InstantiatingGrpcChannelProviderTest. An example is a recent run on main's release-please branch (job 110584625307). On a branch with the stray inclusion removed, the same job runs the full gax-grpc suite.

Expected: keep the two exclusions (tests that depend on environment variables), and run the rest of the gax-grpc unit suite.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions