Remove unused test option
MODIFY
testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/base/HttpClientTest.groovy
testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/base/HttpClientTest.groovy
package io.opentelemetry.instrumentation.test.base
-import static org.junit.jupiter.api.Assumptions.assumeTrue
-import static org.junit.jupiter.api.Assumptions.assumeFalse
-
import io.opentelemetry.api.common.AttributeKey
import io.opentelemetry.api.trace.SpanId
import io.opentelemetry.instrumentation.test.InstrumentationSpecification
@@ -22,6 +19,9 @@ import spock.lang.Requires
import spock.lang.Shared
import spock.lang.Unroll
+import static org.junit.jupiter.api.Assumptions.assumeFalse
+import static org.junit.jupiter.api.Assumptions.assumeTrue
+
@Unroll
abstract class HttpClientTest<REQUEST> extends InstrumentationSpecification {
protected static final BODY_METHODS = ["POST", "PUT"]
@@ -200,16 +200,6 @@ abstract class HttpClientTest<REQUEST> extends InstrumentationSpecification {
return HttpClientTest.this.testHttps()
}
- @Override
- protected boolean testCausality() {
- return HttpClientTest.this.testCausality()
- }
-
- @Override
- protected boolean testCausalityWithCallback() {
- return HttpClientTest.this.testCausalityWithCallback()
- }
-
@Override
protected boolean testCallback() {
return HttpClientTest.this.testCallback()
@@ -402,14 +392,11 @@ abstract class HttpClientTest<REQUEST> extends InstrumentationSpecification {
* propagate trace context.
*/
def "high concurrency test"() {
- assumeTrue(testCausality())
expect:
junitTest.highConcurrency()
}
def "high concurrency test with callback"() {
- assumeTrue(testCausality())
- assumeTrue(testCausalityWithCallback())
assumeTrue(testCallback())
assumeTrue(testCallbackWithParent())
expect:
@@ -493,14 +480,6 @@ abstract class HttpClientTest<REQUEST> extends InstrumentationSpecification {
true
}
- boolean testCausality() {
- true
- }
-
- boolean testCausalityWithCallback() {
- true
- }
-
boolean testCallback() {
return true
}

MODIFY
testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/http/AbstractHttpClientTest.java
testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/http/AbstractHttpClientTest.java
@@ -183,12 +183,6 @@ public abstract class AbstractHttpClientTest<REQUEST> {
if (!testHttps()) {
options.disableTestHttps();
}
- if (!testCausality()) {
- options.disableTestCausality();
- }
- if (!testCausalityWithCallback()) {
- options.disableTestCausalityWithCallback();
- }
if (!testCallback()) {
options.disableTestCallback();
}
@@ -704,8 +698,6 @@ public abstract class AbstractHttpClientTest<REQUEST> {
*/
@Test
void highConcurrency() {
- assumeTrue(options.testCausality);
-
int count = 50;
String method = "GET";
URI uri = resolveAddress("/success");
@@ -777,8 +769,6 @@ public abstract class AbstractHttpClientTest<REQUEST> {
@Test
void highConcurrencyWithCallback() {
- assumeTrue(options.testCausality);
- assumeTrue(options.testCausalityWithCallback);
assumeTrue(options.testCallback);
assumeTrue(options.testCallbackWithParent);
@@ -1121,14 +1111,6 @@ public abstract class AbstractHttpClientTest<REQUEST> {
return true;
}
- protected boolean testCausality() {
- return true;
- }
-
- protected boolean testCausalityWithCallback() {
- return true;
- }
-
protected boolean testCallback() {
return true;
}

MODIFY
testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/http/HttpClientTestOptions.java
testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/http/HttpClientTestOptions.java
@@ -53,8 +53,6 @@ public final class HttpClientTestOptions {
boolean testReadTimeout = false;
boolean testRemoteConnection = true;
boolean testHttps = true;
- boolean testCausality = true;
- boolean testCausalityWithCallback = true;
boolean testCallback = true;
boolean testCallbackWithParent = true;
boolean testCallbackWithImplicitParent = false;
@@ -156,18 +154,6 @@ public final class HttpClientTestOptions {
return this;
}
- @CanIgnoreReturnValue
- public HttpClientTestOptions disableTestCausality() {
- testCausality = false;
- return this;
- }
-
- @CanIgnoreReturnValue
- public HttpClientTestOptions disableTestCausalityWithCallback() {
- testCausalityWithCallback = false;
- return this;
- }
-
@CanIgnoreReturnValue
public HttpClientTestOptions disableTestCallback() {
testCallback = false;

Remove unused test option (#6950)