Skip to content

Commit 3070898

Browse files
committed
fix review
1 parent 57cf3aa commit 3070898

File tree

1 file changed

+4
-6
lines changed
  • instrumentation/rediscala-1.8/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/rediscala

1 file changed

+4
-6
lines changed

instrumentation/rediscala-1.8/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/rediscala/RediscalaClientTest.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import scala.Option;
3131
import scala.concurrent.Future;
3232

33-
public class RediscalaClientTest {
33+
class RediscalaClientTest {
3434

3535
@RegisterExtension
3636
static final InstrumentationExtension testing = AgentInstrumentationExtension.create();
@@ -42,19 +42,16 @@ public class RediscalaClientTest {
4242
@SuppressWarnings("deprecation") // DB_OPERATION is deprecated
4343
public static final AttributeKey<String> DB_OPERATION = DbIncubatingAttributes.DB_OPERATION;
4444

45-
private static String host;
46-
private static int port;
4745
private static Object system;
4846
private static RedisClient redisClient;
4947

5048
@BeforeAll
5149
static void setUp() throws Exception {
5250
redisServer = new GenericContainer<>("redis:6.2.3-alpine").withExposedPorts(6379);
5351
redisServer.start();
54-
// cleanup.deferCleanup(redisServer::stop);
5552

56-
host = redisServer.getHost();
57-
port = redisServer.getMappedPort(6379);
53+
String host = redisServer.getHost();
54+
Integer port = redisServer.getMappedPort(6379);
5855

5956
try {
6057
Class<?> clazz = Class.forName("akka.actor.ActorSystem");
@@ -98,6 +95,7 @@ static void tearDown() throws Exception {
9895
if (system != null) {
9996
system.getClass().getMethod("terminate").invoke(system);
10097
}
98+
redisServer.stop();
10199
}
102100

103101
@Test

0 commit comments

Comments
 (0)