Skip to content

Commit ddd292b

Browse files
committed
fix tests
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
1 parent b95f333 commit ddd292b

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLHighlightIT.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void init() throws Exception {
3030
}
3131

3232
@Test
33-
public void testHighlightWithWildcardFields() throws IOException {
33+
public void testHighlightWildcardFieldsPresent() throws IOException {
3434
JSONObject result =
3535
executeQueryWithHighlight(
3636
"search source=" + TEST_INDEX_ACCOUNT + " \\\"Street\\\"",
@@ -58,7 +58,7 @@ public void testHighlightWithWildcardFields() throws IOException {
5858
}
5959

6060
@Test
61-
public void testHighlightWithSpecificField() throws IOException {
61+
public void testHighlightSpecificFieldOnly() throws IOException {
6262
JSONObject result =
6363
executeQueryWithHighlight(
6464
"search source=" + TEST_INDEX_ACCOUNT + " \\\"Street\\\"",
@@ -86,7 +86,7 @@ public void testHighlightWithSpecificField() throws IOException {
8686
}
8787

8888
@Test
89-
public void testHighlightWithCustomTags() throws IOException {
89+
public void testHighlightCustomTagsApplied() throws IOException {
9090
JSONObject result =
9191
executeQueryWithHighlight(
9292
"search source=" + TEST_INDEX_ACCOUNT + " \\\"Street\\\"",
@@ -114,15 +114,15 @@ public void testHighlightWithCustomTags() throws IOException {
114114
}
115115

116116
@Test
117-
public void testNoHighlightWhenNotRequested() throws IOException {
117+
public void testHighlightOmittedWhenNotRequested() throws IOException {
118118
JSONObject result =
119119
executeQueryNoHighlight("search source=" + TEST_INDEX_ACCOUNT + " \\\"Street\\\"");
120120

121121
assertFalse("Should not have highlights when not requested", result.has("highlights"));
122122
}
123123

124124
@Test
125-
public void testHighlightWithPipedFilter() throws IOException {
125+
public void testHighlightAlignedAfterPipedFilter() throws IOException {
126126
JSONObject result =
127127
executeQueryWithHighlight(
128128
"search source=" + TEST_INDEX_ACCOUNT + " \\\"Street\\\" | where age > 30",
@@ -135,7 +135,7 @@ public void testHighlightWithPipedFilter() throws IOException {
135135
}
136136

137137
@Test
138-
public void testExplainWithHighlight() throws IOException {
138+
public void testExplainContainsHighlightClause() throws IOException {
139139
Request request = new Request("POST", "/_plugins/_ppl/_explain");
140140
request.setJsonEntity(
141141
String.format(

protocol/src/test/java/org/opensearch/sql/protocol/response/format/SimpleJsonResponseFormatterTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ void formatErrorPretty() {
185185
}
186186

187187
@Test
188-
void formatResponseWithHighlights() {
188+
void testFormatResponseHighlightsPresent() {
189189
QueryResult response =
190190
new QueryResult(
191191
schema,
@@ -208,7 +208,7 @@ void formatResponseWithHighlights() {
208208
}
209209

210210
@Test
211-
void formatResponseWithoutHighlightsOmitsField() {
211+
void testFormatResponseHighlightsOmittedWhenAbsent() {
212212
QueryResult response =
213213
new QueryResult(
214214
schema,

0 commit comments

Comments
 (0)