Skip to content

Commit cb3dc16

Browse files
committed
fix tests
1 parent 708b3ec commit cb3dc16

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

gax-java/gax-grpc/src/test/java/com/google/api/gax/grpc/GrpcCallContextTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void testIgnoringCallCredentials() {
9797
.withTransportChannel(
9898
GrpcTransportChannel.newBuilder()
9999
.setManagedChannel(channel)
100-
.setNeedsCallCredentials(false)
100+
.setCallCredentialsAllowed(false)
101101
.build());
102102
Credentials credentials = Mockito.mock(Credentials.class);
103103
context = context.withCredentials(credentials);

gax-java/gax-grpc/src/test/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProviderTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,8 @@ public void canUseDirectPath_happyPath() throws IOException {
744744
// verify this info is passed correctly to transport channel
745745
TransportChannel transportChannel = provider.getTransportChannel();
746746
Truth.assertThat(((GrpcTransportChannel) transportChannel).isDirectPath()).isTrue();
747-
Truth.assertThat(((GrpcTransportChannel) transportChannel).getNeedsCallCredentials()).isFalse();
747+
Truth.assertThat(((GrpcTransportChannel) transportChannel).isCallCredentialsAllowed())
748+
.isFalse();
748749
transportChannel.shutdownNow();
749750
}
750751

@@ -797,7 +798,8 @@ public void canUseDirectPath_happyPathWithBoundToken() throws IOException {
797798
// verify this info is passed correctly to transport channel
798799
TransportChannel transportChannel = provider.getTransportChannel();
799800
Truth.assertThat(((GrpcTransportChannel) transportChannel).isDirectPath()).isTrue();
800-
Truth.assertThat(((GrpcTransportChannel) transportChannel).getNeedsCallCredentials()).isFalse();
801+
Truth.assertThat(((GrpcTransportChannel) transportChannel).isCallCredentialsAllowed())
802+
.isFalse();
801803
transportChannel.shutdownNow();
802804
}
803805

@@ -823,7 +825,7 @@ public void canUseDirectPath_directPathEnvVarDisabled() throws IOException {
823825
// verify this info is passed correctly to transport channel
824826
TransportChannel transportChannel = provider.getTransportChannel();
825827
Truth.assertThat(((GrpcTransportChannel) transportChannel).isDirectPath()).isFalse();
826-
Truth.assertThat(((GrpcTransportChannel) transportChannel).getNeedsCallCredentials()).isTrue();
828+
Truth.assertThat(((GrpcTransportChannel) transportChannel).isCallCredentialsAllowed()).isTrue();
827829
transportChannel.shutdownNow();
828830
}
829831

0 commit comments

Comments
 (0)