-
Notifications
You must be signed in to change notification settings - Fork 879
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert Aws sdk 2.2 Client core tests from groovy to java (#12949)
Co-authored-by: Lauri Tulmin <[email protected]>
- Loading branch information
Showing
12 changed files
with
1,171 additions
and
834 deletions.
There are no files selected for viewing
15 changes: 0 additions & 15 deletions
15
instrumentation/aws-sdk/aws-sdk-2.2/javaagent/src/test/groovy/Aws2ClientTest.groovy
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
.../src/test/java/io/opentelemetry/javaagent/instrumentation/awssdk/v2_2/Aws2ClientTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.javaagent.instrumentation.awssdk.v2_2; | ||
|
||
import io.opentelemetry.instrumentation.awssdk.v2_2.AbstractAws2ClientTest; | ||
import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension; | ||
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration; | ||
|
||
class Aws2ClientTest extends AbstractAws2ClientTest { | ||
@RegisterExtension | ||
static final InstrumentationExtension testing = AgentInstrumentationExtension.create(); | ||
|
||
@Override | ||
protected InstrumentationExtension getTesting() { | ||
return testing; | ||
} | ||
|
||
@Override | ||
protected ClientOverrideConfiguration.Builder createOverrideConfigurationBuilder() { | ||
return ClientOverrideConfiguration.builder(); | ||
} | ||
} |
17 changes: 0 additions & 17 deletions
17
...tion/aws-sdk/aws-sdk-2.2/library-autoconfigure/src/test/groovy/v2_2/Aws2ClientTest.groovy
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
...oconfigure/src/test/java/io/opentelemetry/instrumentation/awssdk/v2_2/Aws2ClientTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.instrumentation.awssdk.v2_2; | ||
|
||
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; | ||
import io.opentelemetry.instrumentation.testing.junit.LibraryInstrumentationExtension; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration; | ||
|
||
class Aws2ClientTest extends AbstractAws2ClientTest { | ||
@RegisterExtension | ||
static final InstrumentationExtension testing = LibraryInstrumentationExtension.create(); | ||
|
||
@Override | ||
protected InstrumentationExtension getTesting() { | ||
return testing; | ||
} | ||
|
||
@Override | ||
protected ClientOverrideConfiguration.Builder createOverrideConfigurationBuilder() { | ||
return ClientOverrideConfiguration.builder(); | ||
} | ||
} |
22 changes: 0 additions & 22 deletions
22
...ibrary/src/test/groovy/io/opentelemetry/instrumentation/awssdk/v2_2/Aws2ClientTest.groovy
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
....2/library/src/test/java/io/opentelemetry/instrumentation/awssdk/v2_2/Aws2ClientTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.instrumentation.awssdk.v2_2; | ||
|
||
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; | ||
import io.opentelemetry.instrumentation.testing.junit.LibraryInstrumentationExtension; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration; | ||
|
||
class Aws2ClientTest extends AbstractAws2ClientTest { | ||
@RegisterExtension | ||
static final InstrumentationExtension testing = LibraryInstrumentationExtension.create(); | ||
|
||
@Override | ||
protected InstrumentationExtension getTesting() { | ||
return testing; | ||
} | ||
|
||
@Override | ||
protected ClientOverrideConfiguration.Builder createOverrideConfigurationBuilder() { | ||
return ClientOverrideConfiguration.builder() | ||
.addExecutionInterceptor( | ||
AwsSdkTelemetry.builder(getTesting().getOpenTelemetry()) | ||
.setCaptureExperimentalSpanAttributes(true) | ||
.setUseConfiguredPropagatorForMessaging(isSqsAttributeInjectionEnabled()) | ||
.build() | ||
.newExecutionInterceptor()); | ||
} | ||
} |
24 changes: 0 additions & 24 deletions
24
...oreOnly/groovy/io/opentelemetry/instrumentation/awssdk/v2_2/Aws2ClientDynamodbTest.groovy
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
...estCoreOnly/java/io/opentelemetry/instrumentation/awssdk/v2_2/Aws2ClientDynamodbTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.instrumentation.awssdk.v2_2; | ||
|
||
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; | ||
import io.opentelemetry.instrumentation.testing.junit.LibraryInstrumentationExtension; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration; | ||
|
||
class Aws2ClientDynamodbTest extends AbstractAws2ClientCoreTest { | ||
@RegisterExtension | ||
static final InstrumentationExtension testing = LibraryInstrumentationExtension.create(); | ||
|
||
@Override | ||
protected InstrumentationExtension getTesting() { | ||
return testing; | ||
} | ||
|
||
@Override | ||
protected ClientOverrideConfiguration.Builder createOverrideConfigurationBuilder() { | ||
return ClientOverrideConfiguration.builder() | ||
.addExecutionInterceptor( | ||
AwsSdkTelemetry.builder(getTesting().getOpenTelemetry()) | ||
.setCaptureExperimentalSpanAttributes(true) | ||
.setUseConfiguredPropagatorForMessaging(isSqsAttributeInjectionEnabled()) | ||
.build() | ||
.newExecutionInterceptor()); | ||
} | ||
} |
Oops, something went wrong.