|
17 | 17 | package com.navercorp.pinpoint.plugin.lettuce; |
18 | 18 |
|
19 | 19 | import com.navercorp.pinpoint.bootstrap.plugin.test.Expectations; |
20 | | -import com.navercorp.pinpoint.bootstrap.plugin.test.ExpectedTrace; |
21 | 20 | import com.navercorp.pinpoint.bootstrap.plugin.test.PluginTestVerifier; |
22 | 21 | import com.navercorp.pinpoint.bootstrap.plugin.test.PluginTestVerifierHolder; |
23 | 22 | import com.navercorp.pinpoint.pluginit.utils.AgentPath; |
|
31 | 30 | import com.navercorp.pinpoint.test.plugin.shared.SharedTestBeforeAllResult; |
32 | 31 | import com.navercorp.pinpoint.test.plugin.shared.SharedTestLifeCycleClass; |
33 | 32 | import io.lettuce.core.AbstractRedisAsyncCommands; |
34 | | -import io.lettuce.core.RedisAsyncCommandsImpl; |
35 | 33 | import io.lettuce.core.RedisClient; |
36 | 34 | import io.lettuce.core.RedisFuture; |
37 | 35 | import io.lettuce.core.api.StatefulRedisConnection; |
|
53 | 51 | @ImportPlugin("com.navercorp.pinpoint:pinpoint-redis-lettuce-plugin") |
54 | 52 | @Dependency({"io.lettuce:lettuce-core:[5.0,]", |
55 | 53 | "org.latencyutils:LatencyUtils:[2.0.3]", |
56 | | - "it.ozimov:embedded-redis:[0.7.3]", |
57 | | - PluginITConstants.VERSION, TestcontainersOption.TEST_CONTAINER, TestcontainersOption.MARIADB}) |
| 54 | + PluginITConstants.VERSION, TestcontainersOption.TEST_CONTAINER}) |
58 | 55 | @SharedTestLifeCycleClass(RedisServer.class) |
59 | 56 | public class RedisClient_IT { |
60 | 57 | private static final String SERVICE_TYPE_REDIS_LETTUCE = "REDIS_LETTUCE"; |
61 | 58 |
|
62 | 59 | private final Logger logger = LogManager.getLogger(getClass()); |
63 | 60 |
|
| 61 | + private static String host; |
64 | 62 | private static int port; |
65 | 63 | private static RedisClient redisClient; |
66 | 64 |
|
67 | 65 | @SharedTestBeforeAllResult |
68 | 66 | public static void setBeforeAllResult(Properties beforeAllResult) { |
69 | 67 | final String value = beforeAllResult.getProperty("PORT"); |
70 | 68 | port = Integer.parseInt(value); |
| 69 | + host = beforeAllResult.getProperty("HOST"); |
| 70 | + |
71 | 71 | } |
72 | 72 |
|
73 | 73 | @BeforeClass |
74 | | - public static void beforeClass() throws Exception { |
75 | | - redisClient = RedisClient.create("redis://localhost:" + port); |
| 74 | + public static void beforeClass() { |
| 75 | + String url = String.format("redis://%s:%s", host, port); |
| 76 | + redisClient = RedisClient.create(url); |
76 | 77 | } |
77 | 78 |
|
78 | 79 | @Test |
|
0 commit comments