diff --git a/demos/roms-documents/src/test/java/com/redis/om/documents/TestConfig.java b/demos/roms-documents/src/test/java/com/redis/om/documents/TestConfig.java index 981d8f22..1cc434f3 100644 --- a/demos/roms-documents/src/test/java/com/redis/om/documents/TestConfig.java +++ b/demos/roms-documents/src/test/java/com/redis/om/documents/TestConfig.java @@ -25,7 +25,7 @@ public JedisConnectionFactory jedisConnectionFactory() { final JedisPoolConfig poolConfig = new JedisPoolConfig(); poolConfig.setTestWhileIdle(false); - poolConfig.setMinEvictableIdleTime(Duration.ofMillis(60000)); + poolConfig.setMinEvictableIdleDuration(Duration.ofMillis(60000)); poolConfig.setTimeBetweenEvictionRuns(Duration.ofMillis(30000)); poolConfig.setNumTestsPerEvictionRun(-1); diff --git a/redis-om-spring/src/test/java/com/redis/om/spring/annotations/hash/RedisHashVSSIndexCreationTest.java b/redis-om-spring/src/test/java/com/redis/om/spring/annotations/hash/RedisHashVSSIndexCreationTest.java index d4df67d2..d12676b5 100644 --- a/redis-om-spring/src/test/java/com/redis/om/spring/annotations/hash/RedisHashVSSIndexCreationTest.java +++ b/redis-om-spring/src/test/java/com/redis/om/spring/annotations/hash/RedisHashVSSIndexCreationTest.java @@ -24,7 +24,7 @@ class RedisHashVSSIndexCreationTest extends AbstractBaseEnhancedRedisTest { private UnifiedJedis jedis; - private static String INDEX = "com.redis.om.spring.annotations.hash.fixtures.HashWithVectorsIdx"; + private static final String INDEX = "com.redis.om.spring.annotations.hash.fixtures.HashWithVectorsIdx"; private HashWithVectors hwv1; private HashWithVectors hwv2; private HashWithVectors hwv3; diff --git a/redis-om-spring/src/test/java/com/redis/om/spring/annotations/hash/serialization/SerializationTest.java b/redis-om-spring/src/test/java/com/redis/om/spring/annotations/hash/serialization/SerializationTest.java index f365b6cd..d738c280 100644 --- a/redis-om-spring/src/test/java/com/redis/om/spring/annotations/hash/serialization/SerializationTest.java +++ b/redis-om-spring/src/test/java/com/redis/om/spring/annotations/hash/serialization/SerializationTest.java @@ -220,7 +220,7 @@ void testHashDeserializationUsingCustomFinder() { @Test void testLocalDateDeSerializationInQuery() { - List all = repository.findByLocalDateGreaterThan(localDate.minus(2, ChronoUnit.DAYS)); + List all = repository.findByLocalDateGreaterThan(localDate.minusDays(2)); assertThat(all).containsExactlyInAnyOrder(ks, ks1, ks2, ks3, ks4); } diff --git a/redis-om-spring/src/test/java/com/redis/om/spring/search/stream/EntityStreamsIssuesTest.java b/redis-om-spring/src/test/java/com/redis/om/spring/search/stream/EntityStreamsIssuesTest.java index 3008cebc..3d1c3fec 100644 --- a/redis-om-spring/src/test/java/com/redis/om/spring/search/stream/EntityStreamsIssuesTest.java +++ b/redis-om-spring/src/test/java/com/redis/om/spring/search/stream/EntityStreamsIssuesTest.java @@ -238,7 +238,7 @@ void testFreeFormTextSearchOrderIssue() { .filter(Doc2$.TEXT.endsWith("o 11")) // .collect(Collectors.toList()); - String regex = ".*o\s11$"; + String regex = ".*o 11$"; assertThat(startingWithMarca2).map(Doc2::getText).allMatch(t -> t.matches(regex)); } @@ -247,13 +247,13 @@ void testFreeFormTextSearchOrderIssue() { .filter(Doc2$.TAG.endsWith("LOR 12")) // .collect(Collectors.toList()); - String regex = ".*LOR\s12$"; + String regex = ".*LOR 12$"; assertThat(startingWithMarca2).map(Doc2::getTag).allMatch(t -> t.matches(regex)); } @Test void testSearchInsideListOfObjects() { var results = entityStream.of(DeepList.class) // - .filter(DeepList$.NEST_LEVELS.NAME.eq("nl-2-2")) // + .filter(DeepList_nestLevels$.NAME.eq("nl-2-2")) // .map(DeepList$.NAME) // .collect(Collectors.toList()); @@ -265,7 +265,7 @@ void testFreeFormTextSearchOrderIssue() { @Test void testSearchInsideListOfObjects2() { var results = entityStream.of(DeepList.class) // - .filter(DeepList$.NEST_LEVELS.NAME.startsWith("nl-2")) // + .filter(DeepList_nestLevels$.NAME.startsWith("nl-2")) // .map(DeepList$.NAME) // .collect(Collectors.toList()); @@ -277,7 +277,7 @@ void testFreeFormTextSearchOrderIssue() { @Test void testSearchInsideListOfObjects3() { var results = entityStream.of(DeepList.class) // - .filter(DeepList$.NEST_LEVELS.BLOCK.eq("have")) // + .filter(DeepList_nestLevels$.BLOCK.eq("have")) // .map(DeepList$.NAME) // .collect(Collectors.toList()); diff --git a/redis-om-spring/src/test/java/com/redis/om/spring/util/ObjectUtilsTest.java b/redis-om-spring/src/test/java/com/redis/om/spring/util/ObjectUtilsTest.java index e39707d6..3f6a961b 100644 --- a/redis-om-spring/src/test/java/com/redis/om/spring/util/ObjectUtilsTest.java +++ b/redis-om-spring/src/test/java/com/redis/om/spring/util/ObjectUtilsTest.java @@ -385,7 +385,7 @@ public void testInvalidStartCharacter() { @Test public void testInvalidPartCharacter() { String result = ObjectUtils.replaceIfIllegalJavaIdentifierCharacter("invalid*identifier"); - assertThat(result).isEqualTo("invalid" + ObjectUtils.REPLACEMENT_CHARACTER.toString() + "identifier"); + assertThat(result).isEqualTo("invalid" + ObjectUtils.REPLACEMENT_CHARACTER + "identifier"); } @Test