Skip to content

Commit e663168

Browse files
mridula-s109jfreden
authored andcommitted
Removed logger and also fixed the nitpick comments (elastic#124650)
1 parent 3e7e82b commit e663168

File tree

1 file changed

+2
-7
lines changed
  • x-pack/plugin/ent-search/src/test/java/org/elasticsearch/xpack/application/rules

1 file changed

+2
-7
lines changed

x-pack/plugin/ent-search/src/test/java/org/elasticsearch/xpack/application/rules/QueryRuleTests.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ public void testNumericValidationWithEmptyValues() throws IOException {
126126
IllegalArgumentException.class,
127127
() -> QueryRule.fromXContentBytes(new BytesArray(content), XContentType.JSON)
128128
);
129-
logger.info("Actual error message: " + e.getMessage());
130-
assertTrue(e.getMessage().contains("failed to parse field [criteria]"));
129+
assertThat(e.getMessage(), containsString("failed to parse field [criteria]"));
131130
}
132131

133132
public void testToXContent() throws IOException {
@@ -158,11 +157,7 @@ public void testToXContentEmptyCriteria() throws IOException {
158157
IllegalArgumentException.class,
159158
() -> QueryRule.fromXContentBytes(new BytesArray(content), XContentType.JSON)
160159
);
161-
logger.info("Actual error message for empty criteria: " + e.getMessage());
162-
assertTrue(
163-
"Error message [" + e.getMessage() + "] should contain 'Failed to build [query_rule]'",
164-
e.getMessage().contains("Failed to build [query_rule]")
165-
);
160+
assertThat(e.getMessage(), containsString("Failed to build [query_rule]"));
166161
}
167162

168163
public void testToXContentValidPinnedRulesWithIds() throws IOException {

0 commit comments

Comments
 (0)