Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
23147be
feat(storage): add support for DirectPath over Interconnect
nidhiii-27 Aug 6, 2026
213ada7
chore: ignore integration test due to environment constraints
nidhiii-27 Aug 6, 2026
c1b4f5f
Merge branch 'main' into add-dp-over-gci
nidhiii-27 Aug 13, 2026
e0177bd
Merge branch 'main' into add-dp-over-gci
nidhiii-27 Sep 1, 2026
aee5030
fix(storage): resolve review comments for DirectPath over Interconnect
nidhiii-27 Sep 1, 2026
fb844cb
fix(storage): conditionally override authority and add BetaApi annota…
nidhiii-27 Sep 4, 2026
618641b
style(storage): fix formatting and checkstyle lint issues
nidhiii-27 Sep 4, 2026
580252a
style(storage): fix formatting and checkstyle lint issues
nidhiii-27 Sep 4, 2026
dfcad40
fix(storage): address PR review comments for DirectPath over Intercon…
nidhiii-27 Sep 7, 2026
2a9ed3b
style(gax-grpc): resolve SonarCloud code quality issues on PR #14006
nidhiii-27 Sep 7, 2026
20c37c6
fix(gax-grpc): resolve Surefire test exclusion and authority reflecti…
nidhiii-27 Sep 7, 2026
640c499
test(gax-grpc): parameterize endpoint validation tests
nidhiii-27 Sep 7, 2026
26c89f4
fix(storage): resolve PR comments for DirectPath over Interconnect
nidhiii-27 Sep 10, 2026
91f07d7
Merge branch 'main' into add-dp-over-gci
nidhiii-27 Sep 28, 2026
d50698e
fix(gax): resolve PR comments on DirectPath over Interconnect
nidhiii-27 Oct 6, 2026
29e6854
style(gax-grpc): format InstantiatingGrpcChannelProvider and test
nidhiii-27 Oct 6, 2026
3b90b52
Merge branch 'main' into add-dp-over-gci
nidhiii-27 Oct 8, 2026
798bc99
fix(storage): resolve merge conflicts and CI failures in DirectPath o…
nidhiii-27 Oct 12, 2026
fde7564
fix(gax): address review comments for DirectPath over Interconnect
nidhiii-27 Oct 15, 2026
6e68d6b
fix(gax,storage): move DirectPath over Interconnect host rewrite to G…
nidhiii-27 Oct 23, 2026
ab59340
test(gax-grpc): rename Interconnect channel builder test methods
nidhiii-27 Oct 26, 2026
dd37344
feat(gax-grpc): support GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS_OVER_INTE…
nidhiii-27 Oct 27, 2026
5abea2c
Merge branch 'main' into add-dp-over-gci
nidhiii-27 Oct 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test(gax-grpc): parameterize endpoint validation tests
Replace 4 duplicate invalid endpoint tests with a single parameterized test to address SonarCloud java:S5976.

[Generated-by: AI]
  • Loading branch information
nidhiii-27 committed Sep 7, 2026
commit 640c499eea4373913b6ad7f86f7fa323b0ddffbc
1 change: 1 addition & 0 deletions sdk-platform-java/gax-java/gax-grpc/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ _COMPILE_DEPS = [

_TEST_COMPILE_DEPS = [
"@org_junit_jupiter_junit_jupiter_api//jar",
"@org_junit_jupiter_junit_jupiter_params//jar",
"@org_mockito_mockito_core//jar",
"@org_mockito_mockito_junit_jupiter//jar",
"@com_google_truth_truth//jar",
Expand Down
6 changes: 6 additions & 0 deletions sdk-platform-java/gax-java/gax-grpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import org.mockito.ArgumentCaptor;
import org.mockito.Mockito;

Expand Down Expand Up @@ -138,34 +140,13 @@ void testEndpointCustomUriScheme() {
assertEquals("google-c2p:///storage.googleapis.com", builder.getEndpoint());
}

@Test
void testEndpointCustomUriSchemeInvalid() {
InstantiatingGrpcChannelProvider.Builder builder =
InstantiatingGrpcChannelProvider.newBuilder();
assertThrows(
IllegalArgumentException.class, () -> builder.setEndpoint("google-c2p://:invalid"));
}

@Test
void testEndpointCustomUriSchemeMalformed() {
InstantiatingGrpcChannelProvider.Builder builder =
InstantiatingGrpcChannelProvider.newBuilder();
assertThrows(
IllegalArgumentException.class, () -> builder.setEndpoint("google-c2p:///foo bar"));
}

@Test
void testEndpointNoPort() {
InstantiatingGrpcChannelProvider.Builder builder =
InstantiatingGrpcChannelProvider.newBuilder();
assertThrows(IllegalArgumentException.class, () -> builder.setEndpoint("localhost"));
}

@Test
void testEndpointBadPort() {
@ParameterizedTest
@ValueSource(
strings = {"google-c2p://:invalid", "google-c2p:///foo bar", "localhost", "localhost:abcd"})
void testEndpointInvalid(String invalidEndpoint) {
InstantiatingGrpcChannelProvider.Builder builder =
InstantiatingGrpcChannelProvider.newBuilder();
assertThrows(IllegalArgumentException.class, () -> builder.setEndpoint("localhost:abcd"));
assertThrows(IllegalArgumentException.class, () -> builder.setEndpoint(invalidEndpoint));
}

@Test
Expand Down
Loading
⌂ 换网址