Skip to content

Commit

Permalink
[TEMPORARY] [TEST] Disable FT.PROFILE tests (#3881)
Browse files Browse the repository at this point in the history
Disable FT.PROFILE tests
  • Loading branch information
sazzad16 authored Jul 3, 2024
1 parent f4fcc36 commit 780fbc7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
55 changes: 29 additions & 26 deletions src/test/java/redis/clients/jedis/modules/search/SearchTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -1200,19 +1201,20 @@ public void testHNSWVVectorSimilarity() {
assertEquals("a", doc1.getId());
assertEquals("0", doc1.get("__v_score"));

// profile
Map.Entry<SearchResult, Map<String, Object>> 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<String, Object>) reply.getValue().get("Iterators profile")).get("Type"));
} else {
assertEquals(Arrays.asList("VECTOR"),
((List<Map<String, Object>>) reply.getValue().get("Iterators profile")).stream()
.map(map -> map.get("Type")).collect(Collectors.toList()));
}
// // @org.junit.Ignore
// // profile
// Map.Entry<SearchResult, Map<String, Object>> 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<String, Object>) reply.getValue().get("Iterators profile")).get("Type"));
// } else {
// assertEquals(Arrays.asList("VECTOR"),
// ((List<Map<String, Object>>) reply.getValue().get("Iterators profile")).stream()
// .map(map -> map.get("Type")).collect(Collectors.toList()));
// }
}

@Test
Expand All @@ -1238,19 +1240,20 @@ public void testFlatVectorSimilarity() {
assertEquals("a", doc1.getId());
assertEquals("0", doc1.get("__v_score"));

// profile
Map.Entry<SearchResult, Map<String, Object>> 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<String, Object>) reply.getValue().get("Iterators profile")).get("Type"));
} else {
assertEquals(Arrays.asList("VECTOR"),
((List<Map<String, Object>>) reply.getValue().get("Iterators profile")).stream()
.map(map -> map.get("Type")).collect(Collectors.toList()));
}
// // @org.junit.Ignore
// // profile
// Map.Entry<SearchResult, Map<String, Object>> 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<String, Object>) reply.getValue().get("Iterators profile")).get("Type"));
// } else {
// assertEquals(Arrays.asList("VECTOR"),
// ((List<Map<String, Object>>) reply.getValue().get("Iterators profile")).stream()
// .map(map -> map.get("Type")).collect(Collectors.toList()));
// }
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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")));
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -1131,6 +1134,7 @@ public void vectorSearchProfile() {
assertEquals("Sorter", resultProcessorsProfile.get(2).get("Type"));
}

@Ignore
@Test
public void maxPrefixExpansionSearchProfile() {
final String configParam = "MAXPREFIXEXPANSIONS";
Expand Down Expand Up @@ -1158,6 +1162,7 @@ public void maxPrefixExpansionSearchProfile() {
}
}

@Ignore
@Test
public void noContentSearchProfile() {
assertOK(client.ftCreate(index, TextField.of("t")));
Expand Down Expand Up @@ -1185,6 +1190,7 @@ public void noContentSearchProfile() {
}
}

@Ignore
@Test
public void deepReplySearchProfile() {
assertOK(client.ftCreate(index, TextField.of("t")));
Expand Down Expand Up @@ -1226,6 +1232,7 @@ private void deepReplySearchProfile_assertProfile(Map<String, Object> attr,
}
}

@Ignore
@Test
public void limitedSearchProfile() {
assertOK(client.ftCreate(index, TextField.of("t")));
Expand Down

0 comments on commit 780fbc7

Please sign in to comment.