From 780fbc74c6b114953ea31492c92c1955bab93ce7 Mon Sep 17 00:00:00 2001 From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com> Date: Wed, 3 Jul 2024 15:29:02 +0600 Subject: [PATCH] [TEMPORARY] [TEST] Disable FT.PROFILE tests (#3881) Disable FT.PROFILE tests --- .../jedis/modules/search/AggregationTest.java | 1 + .../jedis/modules/search/SearchTest.java | 55 ++++++++++--------- .../modules/search/SearchWithParamsTest.java | 7 +++ 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/src/test/java/redis/clients/jedis/modules/search/AggregationTest.java b/src/test/java/redis/clients/jedis/modules/search/AggregationTest.java index cefdfbe5d3..98e811472e 100644 --- a/src/test/java/redis/clients/jedis/modules/search/AggregationTest.java +++ b/src/test/java/redis/clients/jedis/modules/search/AggregationTest.java @@ -134,6 +134,7 @@ public void testAggregations2() { assertEquals("10", rows.get(1).get("sum")); } + @org.junit.Ignore @Test public void testAggregations2Profile() { Schema sc = new Schema(); diff --git a/src/test/java/redis/clients/jedis/modules/search/SearchTest.java b/src/test/java/redis/clients/jedis/modules/search/SearchTest.java index 1bc6cb345d..27f72483db 100644 --- a/src/test/java/redis/clients/jedis/modules/search/SearchTest.java +++ b/src/test/java/redis/clients/jedis/modules/search/SearchTest.java @@ -1140,6 +1140,7 @@ public void testDialectsWithFTExplain() throws Exception { assertTrue("Should contain '{K=10 nearest vector'", client.ftExplain(index, query).contains("{K=10 nearest vector")); } + @org.junit.Ignore @Test public void searchProfile() { Schema sc = new Schema().addTextField("t1", 1.0).addTextField("t2", 1.0); @@ -1200,19 +1201,20 @@ public void testHNSWVVectorSimilarity() { assertEquals("a", doc1.getId()); assertEquals("0", doc1.get("__v_score")); - // profile - Map.Entry> reply - = client.ftProfileSearch(index, FTProfileParams.profileParams(), query); - doc1 = reply.getKey().getDocuments().get(0); - assertEquals("a", doc1.getId()); - assertEquals("0", doc1.get("__v_score")); - if (protocol != RedisProtocol.RESP3) { - assertEquals("VECTOR", ((Map) reply.getValue().get("Iterators profile")).get("Type")); - } else { - assertEquals(Arrays.asList("VECTOR"), - ((List>) reply.getValue().get("Iterators profile")).stream() - .map(map -> map.get("Type")).collect(Collectors.toList())); - } +// // @org.junit.Ignore +// // profile +// Map.Entry> reply +// = client.ftProfileSearch(index, FTProfileParams.profileParams(), query); +// doc1 = reply.getKey().getDocuments().get(0); +// assertEquals("a", doc1.getId()); +// assertEquals("0", doc1.get("__v_score")); +// if (protocol != RedisProtocol.RESP3) { +// assertEquals("VECTOR", ((Map) reply.getValue().get("Iterators profile")).get("Type")); +// } else { +// assertEquals(Arrays.asList("VECTOR"), +// ((List>) reply.getValue().get("Iterators profile")).stream() +// .map(map -> map.get("Type")).collect(Collectors.toList())); +// } } @Test @@ -1238,19 +1240,20 @@ public void testFlatVectorSimilarity() { assertEquals("a", doc1.getId()); assertEquals("0", doc1.get("__v_score")); - // profile - Map.Entry> reply - = client.ftProfileSearch(index, FTProfileParams.profileParams(), query); - doc1 = reply.getKey().getDocuments().get(0); - assertEquals("a", doc1.getId()); - assertEquals("0", doc1.get("__v_score")); - if (protocol != RedisProtocol.RESP3) { - assertEquals("VECTOR", ((Map) reply.getValue().get("Iterators profile")).get("Type")); - } else { - assertEquals(Arrays.asList("VECTOR"), - ((List>) reply.getValue().get("Iterators profile")).stream() - .map(map -> map.get("Type")).collect(Collectors.toList())); - } +// // @org.junit.Ignore +// // profile +// Map.Entry> reply +// = client.ftProfileSearch(index, FTProfileParams.profileParams(), query); +// doc1 = reply.getKey().getDocuments().get(0); +// assertEquals("a", doc1.getId()); +// assertEquals("0", doc1.get("__v_score")); +// if (protocol != RedisProtocol.RESP3) { +// assertEquals("VECTOR", ((Map) reply.getValue().get("Iterators profile")).get("Type")); +// } else { +// assertEquals(Arrays.asList("VECTOR"), +// ((List>) reply.getValue().get("Iterators profile")).stream() +// .map(map -> map.get("Type")).collect(Collectors.toList())); +// } } @Test diff --git a/src/test/java/redis/clients/jedis/modules/search/SearchWithParamsTest.java b/src/test/java/redis/clients/jedis/modules/search/SearchWithParamsTest.java index 897da8eece..8550e5c64a 100644 --- a/src/test/java/redis/clients/jedis/modules/search/SearchWithParamsTest.java +++ b/src/test/java/redis/clients/jedis/modules/search/SearchWithParamsTest.java @@ -9,6 +9,7 @@ import java.util.stream.Collectors; import org.hamcrest.Matchers; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; @@ -1056,6 +1057,7 @@ public void testFlatVectorSimilarity() { assertEquals("0", doc1.get("__v_score")); } + @Ignore @Test public void searchProfile() { assertOK(client.ftCreate(index, TextField.of("t1"), TextField.of("t2"))); @@ -1092,6 +1094,7 @@ public void searchProfile() { .map(map -> map.get("Type")).collect(Collectors.toList())); } + @Ignore @Test public void vectorSearchProfile() { assertOK(client.ftCreate(index, VectorField.builder().fieldName("v") @@ -1131,6 +1134,7 @@ public void vectorSearchProfile() { assertEquals("Sorter", resultProcessorsProfile.get(2).get("Type")); } + @Ignore @Test public void maxPrefixExpansionSearchProfile() { final String configParam = "MAXPREFIXEXPANSIONS"; @@ -1158,6 +1162,7 @@ public void maxPrefixExpansionSearchProfile() { } } + @Ignore @Test public void noContentSearchProfile() { assertOK(client.ftCreate(index, TextField.of("t"))); @@ -1185,6 +1190,7 @@ public void noContentSearchProfile() { } } + @Ignore @Test public void deepReplySearchProfile() { assertOK(client.ftCreate(index, TextField.of("t"))); @@ -1226,6 +1232,7 @@ private void deepReplySearchProfile_assertProfile(Map attr, } } + @Ignore @Test public void limitedSearchProfile() { assertOK(client.ftCreate(index, TextField.of("t")));