Skip to content

Commit

Permalink
Remove unused test option (#6950)
Browse files Browse the repository at this point in the history
  • Loading branch information
trask authored Oct 23, 2022
1 parent 44b02e5 commit f6766c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

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
Expand All @@ -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"]
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -493,14 +480,6 @@ abstract class HttpClientTest<REQUEST> extends InstrumentationSpecification {
true
}
boolean testCausality() {
true
}
boolean testCausalityWithCallback() {
true
}
boolean testCallback() {
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,6 @@ void setupOptions() {
if (!testHttps()) {
options.disableTestHttps();
}
if (!testCausality()) {
options.disableTestCausality();
}
if (!testCausalityWithCallback()) {
options.disableTestCausalityWithCallback();
}
if (!testCallback()) {
options.disableTestCallback();
}
Expand Down Expand Up @@ -704,8 +698,6 @@ void httpsRequest() throws Exception {
*/
@Test
void highConcurrency() {
assumeTrue(options.testCausality);

int count = 50;
String method = "GET";
URI uri = resolveAddress("/success");
Expand Down Expand Up @@ -777,8 +769,6 @@ void highConcurrency() {

@Test
void highConcurrencyWithCallback() {
assumeTrue(options.testCausality);
assumeTrue(options.testCausalityWithCallback);
assumeTrue(options.testCallback);
assumeTrue(options.testCallbackWithParent);

Expand Down Expand Up @@ -1121,14 +1111,6 @@ protected boolean testHttps() {
return true;
}

protected boolean testCausality() {
return true;
}

protected boolean testCausalityWithCallback() {
return true;
}

protected boolean testCallback() {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -156,18 +154,6 @@ public HttpClientTestOptions disableTestHttps() {
return this;
}

@CanIgnoreReturnValue
public HttpClientTestOptions disableTestCausality() {
testCausality = false;
return this;
}

@CanIgnoreReturnValue
public HttpClientTestOptions disableTestCausalityWithCallback() {
testCausalityWithCallback = false;
return this;
}

@CanIgnoreReturnValue
public HttpClientTestOptions disableTestCallback() {
testCallback = false;
Expand Down

0 comments on commit f6766c7

Please sign in to comment.