mirror of https://github.com/grpc/grpc-java.git
Forcibly cast in interop test
This commit is contained in:
parent
14e774130d
commit
c86b547dd3
|
|
@ -711,7 +711,7 @@ public abstract class AbstractTransportTest {
|
||||||
throws Exception {
|
throws Exception {
|
||||||
// cast to ServiceAccountCredentials to double-check the right type of object was created.
|
// cast to ServiceAccountCredentials to double-check the right type of object was created.
|
||||||
GoogleCredentials credentials =
|
GoogleCredentials credentials =
|
||||||
(ServiceAccountCredentials) GoogleCredentials.fromStream(credentialsStream);
|
ServiceAccountCredentials.class.cast(GoogleCredentials.fromStream(credentialsStream));
|
||||||
credentials = credentials.createScoped(Arrays.<String>asList(authScope));
|
credentials = credentials.createScoped(Arrays.<String>asList(authScope));
|
||||||
TestServiceGrpc.TestServiceBlockingStub stub = blockingStub
|
TestServiceGrpc.TestServiceBlockingStub stub = blockingStub
|
||||||
.withInterceptors(new ClientAuthInterceptor(credentials, testServiceExecutor));
|
.withInterceptors(new ClientAuthInterceptor(credentials, testServiceExecutor));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue