Skip to content

Commit 4f6ff6e

Browse files
committed
test: revert unnecessary change
1 parent b149819 commit 4f6ff6e

1 file changed

Lines changed: 2 additions & 65 deletions

File tree

  • sdk-platform-java/java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it

sdk-platform-java/java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITOtelTracing.java

Lines changed: 2 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import static com.google.common.truth.Truth.assertThat;
3434
import static org.junit.Assert.assertThrows;
3535

36+
import com.google.api.client.http.javanet.NetHttpTransport;
3637
import com.google.api.gax.core.NoCredentialsProvider;
3738
import com.google.api.gax.retrying.RetrySettings;
3839
import com.google.api.gax.rpc.StatusCode;
@@ -355,71 +356,7 @@ void testTracing_retry_httpjson() throws Exception {
355356
.setTransportChannelProvider(
356357
EchoSettings.defaultHttpJsonTransportProviderBuilder()
357358
.setHttpTransport(
358-
new com.google.api.client.http.HttpTransport() {
359-
@Override
360-
protected com.google.api.client.http.LowLevelHttpRequest buildRequest(
361-
String method, String url) {
362-
return new com.google.api.client.http.LowLevelHttpRequest() {
363-
@Override
364-
public void addHeader(String name, String value) {}
365-
366-
@Override
367-
public com.google.api.client.http.LowLevelHttpResponse execute() {
368-
return new com.google.api.client.http.LowLevelHttpResponse() {
369-
@Override
370-
public java.io.InputStream getContent() {
371-
return new java.io.ByteArrayInputStream("{}".getBytes());
372-
}
373-
374-
@Override
375-
public String getContentEncoding() {
376-
return null;
377-
}
378-
379-
@Override
380-
public long getContentLength() {
381-
return 2;
382-
}
383-
384-
@Override
385-
public String getContentType() {
386-
return "application/json";
387-
}
388-
389-
@Override
390-
public String getStatusLine() {
391-
return "HTTP/1.1 503 Service Unavailable";
392-
}
393-
394-
@Override
395-
public int getStatusCode() {
396-
return 503;
397-
}
398-
399-
@Override
400-
public String getReasonPhrase() {
401-
return "Service Unavailable";
402-
}
403-
404-
@Override
405-
public int getHeaderCount() {
406-
return 0;
407-
}
408-
409-
@Override
410-
public String getHeaderName(int index) {
411-
return null;
412-
}
413-
414-
@Override
415-
public String getHeaderValue(int index) {
416-
return null;
417-
}
418-
};
419-
}
420-
};
421-
}
422-
})
359+
new NetHttpTransport.Builder().doNotValidateCertificate().build())
423360
.setEndpoint("http://localhost:7469")
424361
.build())
425362
.build();

0 commit comments

Comments
 (0)