Skip to content

Commit

Permalink
Convert lettuce 5.1 SyncClientTest
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydeluca committed Oct 17, 2023
1 parent 096d321 commit 824bcd2
Show file tree
Hide file tree
Showing 9 changed files with 646 additions and 558 deletions.

This file was deleted.

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 InstrumentationExtension agentTesting = AgentInstrumentationExtension.create();

@Override
public InstrumentationExtension getInstrumentationExtension() {
return agentTesting;
}

@Override
protected RedisClient createClient(String uri) {
return RedisClient.create(uri);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* 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 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);
}
}
Loading

0 comments on commit 824bcd2

Please sign in to comment.