Skip to content

Commit e38284d

Browse files
committed
fix ccr test
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
1 parent 90839b6 commit e38284d

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

integ-test/src/test/java/org/opensearch/sql/security/CalciteCrossClusterSearchIT.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import java.io.IOException;
1616
import org.apache.commons.text.StringEscapeUtils;
1717
import org.json.JSONObject;
18+
import org.junit.Assert;
1819
import org.junit.Test;
1920

2021
/** Cross Cluster Search tests with Calcite enabled for enhanced fields features. */
@@ -477,9 +478,15 @@ public void testCrossClusterHighlightWildcard() throws IOException {
477478
JSONObject result =
478479
executeQuery(
479480
String.format(
480-
"search source=%s | highlight * | fields firstname, _highlight",
481+
"search source=%s \\\"Hattie\\\" | highlight * | fields firstname",
481482
TEST_INDEX_BANK_REMOTE));
482-
verifyColumn(result, columnName("firstname"), columnName("_highlight"));
483+
verifySchema(result, schema("firstname", "string"));
484+
verifyDataRows(result, rows("Hattie"));
485+
var highlights = result.getJSONArray("highlights");
486+
var highlight = highlights.getJSONObject(0);
487+
Assert.assertTrue(
488+
"Highlight should contain <em>Hattie</em>",
489+
highlight.getJSONArray("firstname").getString(0).contains("<em>Hattie</em>"));
483490
}
484491

485492
@Test

0 commit comments

Comments
 (0)