test fixed

pull/6394/head
Nikita Koksharov 4 weeks ago
parent 3b7e13a8eb
commit 5d841612ea

@ -25,13 +25,13 @@ public class RedissonCacheTest {
@Container @Container
public static final GenericContainer REDIS = new FixedHostPortGenericContainer("redis:latest") public static final GenericContainer REDIS = new FixedHostPortGenericContainer("redis:latest")
.withFixedExposedPort(6379, 6379); .withExposedPorts(6379);
@Test @Test
public void testCache() throws InterruptedException { public void testCache() throws InterruptedException {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("redisson.threads", "10"); map.put("redisson.threads", "10");
map.put("redisson.single-server-config.address", "redis://127.0.0.1:6379"); map.put("redisson.single-server-config.address", "redis://127.0.0.1:" + REDIS.getFirstMappedPort());
// map.put("redisson.clusterServersConfig.scanInterval", "3333"); // map.put("redisson.clusterServersConfig.scanInterval", "3333");
// map.put("redisson.clusterServersConfig.nodeAddresses", Arrays.asList("redis://127.0.0.2:6379","redis://127.0.0.3:6379")); // map.put("redisson.clusterServersConfig.nodeAddresses", Arrays.asList("redis://127.0.0.2:6379","redis://127.0.0.3:6379"));
map.put("redisson.caches.test.expire-after-write", "10s"); map.put("redisson.caches.test.expire-after-write", "10s");
@ -55,7 +55,7 @@ public class RedissonCacheTest {
public void testCacheNative() throws InterruptedException { public void testCacheNative() throws InterruptedException {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("redisson.threads", "10"); map.put("redisson.threads", "10");
map.put("redisson.single-server-config.address", "redis://127.0.0.1:6379"); map.put("redisson.single-server-config.address", "redis://127.0.0.1:" + REDIS.getFirstMappedPort());
// map.put("redisson.clusterServersConfig.scanInterval", "3333"); // map.put("redisson.clusterServersConfig.scanInterval", "3333");
// map.put("redisson.clusterServersConfig.nodeAddresses", Arrays.asList("redis://127.0.0.2:6379","redis://127.0.0.3:6379")); // map.put("redisson.clusterServersConfig.nodeAddresses", Arrays.asList("redis://127.0.0.2:6379","redis://127.0.0.3:6379"));
map.put("redisson.caches-native.test.expire-after-write", "3s"); map.put("redisson.caches-native.test.expire-after-write", "3s");

Loading…
Cancel
Save