-
Notifications
You must be signed in to change notification settings - Fork 881
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert lettuce 5.1 SyncClientTest from groovy to java (#9697)
- Loading branch information
Showing
10 changed files
with
647 additions
and
559 deletions.
There are no files selected for viewing
17 changes: 0 additions & 17 deletions
17
...oovy/io/opentelemetry/javaagent/instrumentation/lettuce/v5_1/LettuceSyncClientTest.groovy
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
...t/java/io/opentelemetry/javaagent/instrumentation/lettuce/v5_1/LettuceSyncClientTest.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.lettuce.v5_1; | ||
|
||
import io.lettuce.core.RedisClient; | ||
import io.opentelemetry.instrumentation.lettuce.v5_1.AbstractLettuceSyncClientTest; | ||
import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension; | ||
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
class LettuceSyncClientTest extends AbstractLettuceSyncClientTest { | ||
@RegisterExtension | ||
static final InstrumentationExtension testing = AgentInstrumentationExtension.create(); | ||
|
||
@Override | ||
public InstrumentationExtension getInstrumentationExtension() { | ||
return testing; | ||
} | ||
|
||
@Override | ||
protected RedisClient createClient(String uri) { | ||
return RedisClient.create(uri); | ||
} | ||
} |
21 changes: 0 additions & 21 deletions
21
...rc/test/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/LettuceSyncClientTest.groovy
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
...ry/src/test/java/io/opentelemetry/instrumentation/lettuce/v5_1/LettuceSyncClientTest.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,33 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.instrumentation.lettuce.v5_1; | ||
|
||
import io.lettuce.core.RedisClient; | ||
import io.lettuce.core.resource.ClientResources; | ||
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; | ||
import io.opentelemetry.instrumentation.testing.junit.LibraryInstrumentationExtension; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
class LettuceSyncClientTest extends AbstractLettuceSyncClientTest { | ||
@RegisterExtension | ||
static final InstrumentationExtension testing = LibraryInstrumentationExtension.create(); | ||
|
||
@Override | ||
public InstrumentationExtension getInstrumentationExtension() { | ||
return testing; | ||
} | ||
|
||
@Override | ||
protected RedisClient createClient(String uri) { | ||
return RedisClient.create( | ||
ClientResources.builder() | ||
.tracing( | ||
LettuceTelemetry.create(getInstrumentationExtension().getOpenTelemetry()) | ||
.newTracing()) | ||
.build(), | ||
uri); | ||
} | ||
} |
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
Oops, something went wrong.