Skip to content

Commit

Permalink
fix(test): fix metadata-io tests (#12006)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-leifker authored Dec 3, 2024
1 parent db7e51b commit aca1cd7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1367,8 +1367,8 @@ public void testScrollAcrossEntities() throws IOException {
resultUrns.addAll(result.getEntities().stream().map(SearchEntity::getEntity).toList());
scrollId = result.getScrollId();
} while (scrollId != null);
// expect 2 total matching results
assertEquals(totalResults, 2, String.format("query `%s` Results: %s", query, resultUrns));
// expect 8 total matching results
assertEquals(totalResults, 8, String.format("query `%s` Results: %s", query, resultUrns));
}

@Test
Expand Down Expand Up @@ -1745,7 +1745,7 @@ public void testOr() {
String.format("%s - Expected search results to include matched fields", query));
assertEquals(
result.getEntities().size(),
2,
8,
String.format(
"Query: `%s` Results: %s",
query,
Expand Down Expand Up @@ -1776,7 +1776,7 @@ public void testNegate() {
String.format("%s - Expected search results to include matched fields", query));
assertEquals(
result.getEntities().size(),
2,
8,
String.format(
"Query: `%s` Results: %s",
query,
Expand Down
4 changes: 2 additions & 2 deletions metadata-io/src/test/resources/search_config_fixture_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ queryConfigurations:
boost_mode: replace

# Criteria for exact-match only
# Contains quotes, is a single term with `_`, `.`, or `-` (normally consider for tokenization) then use exact match query
# Contains quotes
- queryRegex: >-
^["'].+["']$|^[a-zA-Z0-9]\S+[_.-]\S+[a-zA-Z0-9]$
^["'].+["']$
simpleQuery: false
prefixMatchQuery: true
exactMatchQuery: true
Expand Down

0 comments on commit aca1cd7

Please sign in to comment.