Skip to content

Commit d2dc050

Browse files
committed
move things
1 parent 57ef25c commit d2dc050

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,22 @@ public abstract class AbstractAws2ClientCoreTest {
7070

7171
protected static final MockWebServerExtension server = new MockWebServerExtension();
7272

73+
private static final ImmutableMap<String, AttributeValue> createTableRequestKey =
74+
ImmutableMap.of(
75+
"anotherKey", AttributeValue.builder().s("value").build(),
76+
"key", AttributeValue.builder().s("value").build());
77+
78+
private static final ImmutableMap<String, AttributeValue> getItemRequestKey =
79+
ImmutableMap.of(
80+
"keyOne", AttributeValue.builder().s("value").build(),
81+
"keyTwo", AttributeValue.builder().s("differentValue").build());
82+
83+
private static final ImmutableMap<String, AttributeValue> putItemRequestKey =
84+
ImmutableMap.of(
85+
"key", AttributeValue.builder().s("value").build(),
86+
"attributeOne", AttributeValue.builder().s("one").build(),
87+
"attributeTwo", AttributeValue.builder().s("two").build());
88+
7389
protected abstract InstrumentationExtension getTesting();
7490

7591
protected abstract ClientOverrideConfiguration.Builder createOverrideConfigurationBuilder();
@@ -80,6 +96,10 @@ protected static boolean isSqsAttributeInjectionEnabled() {
8096
"otel.instrumentation.aws-sdk.experimental-use-propagator-for-messaging", false);
8197
}
8298

99+
protected void configureSdkClient(SdkClientBuilder<?, ?> builder) {
100+
builder.overrideConfiguration(createOverrideConfigurationBuilder().build());
101+
}
102+
83103
@BeforeAll
84104
static void setup() {
85105
server.start();
@@ -95,26 +115,6 @@ void prepTest() {
95115
server.beforeTestExecution(null);
96116
}
97117

98-
protected void configureSdkClient(SdkClientBuilder<?, ?> builder) {
99-
builder.overrideConfiguration(createOverrideConfigurationBuilder().build());
100-
}
101-
102-
private static final ImmutableMap<String, AttributeValue> createTableRequestKey =
103-
ImmutableMap.of(
104-
"anotherKey", AttributeValue.builder().s("value").build(),
105-
"key", AttributeValue.builder().s("value").build());
106-
107-
private static final ImmutableMap<String, AttributeValue> getItemRequestKey =
108-
ImmutableMap.of(
109-
"keyOne", AttributeValue.builder().s("value").build(),
110-
"keyTwo", AttributeValue.builder().s("differentValue").build());
111-
112-
private static final ImmutableMap<String, AttributeValue> putItemRequestKey =
113-
ImmutableMap.of(
114-
"key", AttributeValue.builder().s("value").build(),
115-
"attributeOne", AttributeValue.builder().s("one").build(),
116-
"attributeTwo", AttributeValue.builder().s("two").build());
117-
118118
private void validateOperationResponse(String operation, Object response)
119119
throws ExecutionException, InterruptedException {
120120
if (response instanceof Future) {

0 commit comments

Comments
 (0)