Skip to content

Commit

Permalink
Merge fix: after introducing EndpointConfig in #3836
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzad16 committed Jun 6, 2024
1 parent e45e4a7 commit 103575d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,25 @@
import redis.clients.jedis.Connection;
import redis.clients.jedis.ConnectionPoolConfig;
import redis.clients.jedis.DefaultJedisClientConfig;
import redis.clients.jedis.EndpointConfig;
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.HostAndPorts;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisClientConfig;

abstract class ClientSideCacheTestBase {

protected static final HostAndPort hnp = HostAndPorts.getRedisServers().get(1);
private static final EndpointConfig endpoint = HostAndPorts.getRedisEndpoint("standalone1");

protected static final String baseUrl = "redis://:foobared@" + hnp.toString() + "/";
protected static final HostAndPort hnp = endpoint.getHostAndPort();

protected static final String baseUrl = "redis://:foobared@" + hnp.toString() + "/"; // TODO: use EndpointConfig

protected Jedis control;

@Before
public void setUp() throws Exception {
control = new Jedis(hnp, DefaultJedisClientConfig.builder().password("foobared").build());
control = new Jedis(hnp, DefaultJedisClientConfig.builder().password("foobared").build()); // TODO: use EndpointConfig
control.flushAll();
}

Expand All @@ -33,7 +36,7 @@ public void tearDown() throws Exception {
}

protected static final Supplier<JedisClientConfig> clientConfig
= () -> DefaultJedisClientConfig.builder().resp3().password("foobared").build();
= () -> DefaultJedisClientConfig.builder().resp3().password("foobared").build(); // TODO: use EndpointConfig

protected static final Supplier<GenericObjectPoolConfig<Connection>> singleConnectionPoolConfig
= () -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import redis.clients.jedis.Connection;
import redis.clients.jedis.ConnectionPoolConfig;
import redis.clients.jedis.DefaultJedisClientConfig;
import redis.clients.jedis.EndpointConfig;
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.HostAndPorts;
import redis.clients.jedis.Jedis;
Expand All @@ -24,13 +25,15 @@

public class JedisPooledClientSideCacheTest {

protected static final HostAndPort hnp = HostAndPorts.getRedisServers().get(1);
private static final EndpointConfig endpoint = HostAndPorts.getRedisEndpoint("standalone1");

protected static final HostAndPort hnp = endpoint.getHostAndPort();

protected Jedis control;

@Before
public void setUp() throws Exception {
control = new Jedis(hnp, DefaultJedisClientConfig.builder().password("foobared").build());
control = new Jedis(hnp, DefaultJedisClientConfig.builder().password("foobared").build()); // TODO: use EndpointConfig
control.flushAll();
}

Expand All @@ -40,7 +43,7 @@ public void tearDown() throws Exception {
}

private static final Supplier<JedisClientConfig> clientConfig
= () -> DefaultJedisClientConfig.builder().resp3().password("foobared").build();
= () -> DefaultJedisClientConfig.builder().resp3().password("foobared").build(); // TODO: use EndpointConfig

private static final Supplier<GenericObjectPoolConfig<Connection>> singleConnectionPoolConfig
= () -> {
Expand Down

0 comments on commit 103575d

Please sign in to comment.