Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Andriy Redko <drreta@gmail.com>
Signed-off-by: Mikhail Khludnev <mkhludnev@users.noreply.github.com>
  • Loading branch information
mkhludnev and reta authored Nov 26, 2024
1 parent 341e256 commit c7382e3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,15 @@ public void testExceedMaxClauses() throws IOException {
assertTermsHitCount(indexName, "addr", toQuery, expectMatches);
assertTermsHitCount(indexName, "addr.idx", toQuery, expectMatches);
try { // error from mapper/parser
assertTermsHitCount(indexName, "addr.dv", toQuery, expectMatches);
final SearchPhaseExecutionException ose = assertThrows(SearchPhaseExecutionException.class, () -> assertTermsHitCount(indexName, "addr.dv", toQuery, expectMatches));
assertTrue("exceeding on query building", ose.shardFailures()[0].getCause().getCause() instanceof IndexSearcher.TooManyClauses);
fail();
} catch (SearchPhaseExecutionException ose) {
assertTrue("exceeding on query building", ose.shardFailures()[0].getCause().getCause() instanceof IndexSearcher.TooManyClauses);
}
}

public static String getFirstThreeOctets(String ipAddress) {
private static String getFirstThreeOctets(String ipAddress) {
// Split the IP address by the dot delimiter
String[] octets = ipAddress.split("\\.");

Expand Down

0 comments on commit c7382e3

Please sign in to comment.