Skip to content

Commit 63fdefb

Browse files
committed
Revert "add test client error"
This reverts commit 044bc96.
1 parent 044bc96 commit 63fdefb

File tree

3 files changed

+1
-27
lines changed

3 files changed

+1
-27
lines changed

instrumentation/jaxrs-client/jaxrs-client-2.0-testing/src/test/java/io/opentelemetry/javaagent/instrumentation/jaxrsclient/JaxRsClientTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ abstract class JaxRsClientTest extends AbstractHttpClientTest<Invocation.Builder
3333

3434
protected static final List<String> BODY_METHODS = asList("POST", "PUT");
3535
protected static final int CONNECT_TIMEOUT_MS = 5000;
36-
protected static final int READ_TIMEOUT_MS = 3000;
36+
protected static final int READ_TIMEOUT_MS = 2000;
3737

3838
@Override
3939
public Invocation.Builder buildRequest(String method, URI uri, Map<String, String> headers) {
@@ -52,7 +52,6 @@ public Invocation.Builder buildRequest(String method, URI uri, Map<String, Strin
5252
protected void configure(HttpClientTestOptions.Builder optionsBuilder) {
5353
super.configure(optionsBuilder);
5454
optionsBuilder.setTestRedirects(false);
55-
optionsBuilder.setTestClientError(true);
5655
optionsBuilder.setTestNonStandardHttpMethod(false);
5756
}
5857

testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/http/AbstractHttpClientTest.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,26 +1030,6 @@ void spanEndsAfterHeadersReceived() throws Exception {
10301030
});
10311031
}
10321032

1033-
@Test
1034-
void requestClientError() throws Exception {
1035-
assumeTrue(options.getTestClientError());
1036-
1037-
URI uri = resolveAddress("/client-error");
1038-
String method = "GET";
1039-
int responseCode = doRequest(method, uri);
1040-
1041-
assertThat(responseCode).isEqualTo(400);
1042-
1043-
testing.waitAndAssertTraces(
1044-
trace ->
1045-
trace.hasSpansSatisfyingExactly(
1046-
span ->
1047-
assertClientSpan(span, uri, method, 400, null)
1048-
.hasNoParent()
1049-
.hasStatus(StatusData.error()),
1050-
span -> assertServerSpan(span).hasParent(trace.getSpan(0))));
1051-
}
1052-
10531033
// Visible for spock bridge.
10541034
SpanDataAssert assertClientSpan(
10551035
SpanDataAssert span,

testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/http/HttpClientTestOptions.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ public boolean isLowLevelInstrumentation() {
8989

9090
public abstract boolean getTestNonStandardHttpMethod();
9191

92-
public abstract boolean getTestClientError();
93-
9492
public abstract boolean getTestCaptureHttpHeaders();
9593

9694
public abstract Function<URI, String> getHttpProtocolVersion();
@@ -136,7 +134,6 @@ default Builder withDefaults() {
136134
.setTestErrorWithCallback(true)
137135
.setTestNonStandardHttpMethod(true)
138136
.setTestCaptureHttpHeaders(true)
139-
.setTestClientError(false)
140137
.setHttpProtocolVersion(uri -> "1.1");
141138
}
142139

@@ -182,8 +179,6 @@ default Builder withDefaults() {
182179

183180
Builder setTestNonStandardHttpMethod(boolean value);
184181

185-
Builder setTestClientError(boolean value);
186-
187182
Builder setHttpProtocolVersion(Function<URI, String> value);
188183

189184
@CanIgnoreReturnValue

0 commit comments

Comments
 (0)