Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e6ce028

Browse files
committedDec 15, 2024·
cleanup
1 parent 13ff8a0 commit e6ce028

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed
 

‎instrumentation/aws-sdk/aws-sdk-2.2/library/src/test/java/io/opentelemetry/instrumentation/awssdk/v2_2/Aws2SqsSuppressReceiveSpansW3cPropagatorTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ boolean isSqsAttributeInjectionEnabled() {
2121
}
2222

2323
@Override
24-
boolean isXrayInjectionEnabled() {
24+
protected boolean isXrayInjectionEnabled() {
2525
return false;
2626
}
2727
}

‎instrumentation/aws-sdk/aws-sdk-2.2/library/src/test/java/io/opentelemetry/instrumentation/awssdk/v2_2/Aws2SqsW3cPropagatorTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ boolean isSqsAttributeInjectionEnabled() {
2222
}
2323

2424
@Override
25-
boolean isXrayInjectionEnabled() {
25+
protected boolean isXrayInjectionEnabled() {
2626
return false;
2727
}
2828
}

‎instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2SqsBaseTest.java

+8-9
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
import software.amazon.awssdk.services.sqs.model.SendMessageRequest;
5656

5757
public abstract class AbstractAws2SqsBaseTest {
58-
5958
protected abstract InstrumentationExtension getTesting();
6059

6160
protected abstract SqsClient configureSqsClient(SqsClient sqsClient);
@@ -64,12 +63,16 @@ public abstract class AbstractAws2SqsBaseTest {
6463

6564
protected abstract ClientOverrideConfiguration.Builder createOverrideConfigurationBuilder();
6665

66+
protected abstract void assertSqsTraces(Boolean withParent, Boolean captureHeaders);
67+
6768
protected static final StaticCredentialsProvider CREDENTIALS_PROVIDER =
6869
StaticCredentialsProvider.create(
6970
AwsBasicCredentials.create("my-access-key", "my-secret-key"));
7071

71-
protected static int sqsPort;
72-
protected static SQSRestServer sqs;
72+
static int sqsPort;
73+
static SQSRestServer sqs;
74+
75+
protected final String queueUrl = "http://localhost:" + sqsPort + "/000000000000/testSdkSqs";
7376

7477
static Map<String, MessageAttributeValue> dummyMessageAttributes(int count) {
7578
Map<String, MessageAttributeValue> map = new HashMap<>();
@@ -80,8 +83,6 @@ static Map<String, MessageAttributeValue> dummyMessageAttributes(int count) {
8083
return map;
8184
}
8285

83-
protected final String queueUrl = "http://localhost:" + sqsPort + "/000000000000/testSdkSqs";
84-
8586
ReceiveMessageRequest receiveMessageRequest =
8687
ReceiveMessageRequest.builder().queueUrl(queueUrl).build();
8788

@@ -111,11 +112,11 @@ static Map<String, MessageAttributeValue> dummyMessageAttributes(int count) {
111112
e -> e.messageBody("e3").id("i3").messageAttributes(dummyMessageAttributes(10)))
112113
.build();
113114

114-
boolean isXrayInjectionEnabled() {
115+
protected boolean isXrayInjectionEnabled() {
115116
return true;
116117
}
117118

118-
protected void configureSdkClient(SqsClientBuilder builder) throws URISyntaxException {
119+
void configureSdkClient(SqsClientBuilder builder) throws URISyntaxException {
119120
builder
120121
.overrideConfiguration(createOverrideConfigurationBuilder().build())
121122
.endpointOverride(new URI("http://localhost:" + sqsPort));
@@ -135,8 +136,6 @@ boolean isSqsAttributeInjectionEnabled() {
135136
"otel.instrumentation.aws-sdk.experimental-use-propagator-for-messaging", false);
136137
}
137138

138-
protected abstract void assertSqsTraces(Boolean withParent, Boolean captureHeaders);
139-
140139
@BeforeAll
141140
static void setUp() {
142141
sqs = SQSRestServerBuilder.withPort(0).withInterface("localhost").start();

0 commit comments

Comments
 (0)
Please sign in to comment.