1818
1919import static com .google .common .truth .Truth .assertThat ;
2020import static com .google .common .truth .Truth .assertWithMessage ;
21- import static com .google .showcase .v1beta1 .it .util .TestClientInitializer .DEFAULT_GRPC_ENDPOINT ;
22- import static com .google .showcase .v1beta1 .it .util .TestClientInitializer .DEFAULT_HTTPJSON_ENDPOINT ;
2321
2422import com .google .api .client .http .javanet .NetHttpTransport ;
2523import com .google .api .gax .core .NoCredentialsProvider ;
@@ -117,6 +115,9 @@ public class ITPqc {
117115
118116 private static final String DEFAULT_CA_CERT_PATH = "target/showcase-ca.pem" ;
119117
118+ private static final String SECURE_ENDPOINT =
119+ System .getProperty ("showcase.secure.endpoint" , "localhost:7470" );
120+
120121 @ BeforeAll
121122 static void setUp () {
122123 File certFile = new File (DEFAULT_CA_CERT_PATH );
@@ -132,7 +133,7 @@ void testGrpcPqc() throws Exception {
132133 ChannelCredentials creds =
133134 TlsChannelCredentials .newBuilder ().trustManager (new File (DEFAULT_CA_CERT_PATH )).build ();
134135
135- ManagedChannel channel = Grpc .newChannelBuilder (DEFAULT_GRPC_ENDPOINT , creds ).build ();
136+ ManagedChannel channel = Grpc .newChannelBuilder (SECURE_ENDPOINT , creds ).build ();
136137 try {
137138 TransportChannel transportChannel = GrpcTransportChannel .create (channel );
138139
@@ -195,7 +196,7 @@ void testHttpJsonPqc() throws Exception {
195196 InstantiatingHttpJsonChannelProvider transportChannelProvider =
196197 EchoSettings .defaultHttpJsonTransportProviderBuilder ()
197198 .setHttpTransport (transport )
198- .setEndpoint (DEFAULT_HTTPJSON_ENDPOINT . replace ( "http://" , " https://") )
199+ .setEndpoint (" https://" + SECURE_ENDPOINT )
199200 .setInterceptorProvider (() -> Collections .singletonList (interceptor ))
200201 .build ();
201202
@@ -250,7 +251,7 @@ void testHttpJsonPqc_withExplicitSecurityProvider() throws Exception {
250251 InstantiatingHttpJsonChannelProvider transportChannelProvider =
251252 EchoSettings .defaultHttpJsonTransportProviderBuilder ()
252253 .setHttpTransport (transport )
253- .setEndpoint (DEFAULT_HTTPJSON_ENDPOINT . replace ( "http://" , " https://") )
254+ .setEndpoint (" https://" + SECURE_ENDPOINT )
254255 .setInterceptorProvider (() -> Collections .singletonList (interceptor ))
255256 .build ();
256257
0 commit comments