Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Menendez <ianfmenendezd@gmail.com>
  • Loading branch information
IanMenendez committed Sep 14, 2024
1 parent d41d3ec commit 790b6a2
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,17 @@ public void testTextChunkingProcessor_withIgnoreMissing() {
createTextChunkingIndex(INDEX_NAME, IGNORE_MISSING_PIPELINE_NAME);
ingestDocument(TEST_MISSING_FIELD_DOCUMENT);

validateIndexIngestResults(INDEX_NAME, OUTPUT_FIELD, null);
assertEquals(1, getDocCount(INDEX_NAME));
MatchAllQueryBuilder query = new MatchAllQueryBuilder();
Map<String, Object> searchResults = search(INDEX_NAME, query, 10);
assertNotNull(searchResults);
Map<String, Object> document = getFirstInnerHit(searchResults);
assertNotNull(document);
Object documentSource = document.get("_source");
assert (documentSource instanceof Map);
@SuppressWarnings("unchecked")
Map<String, Object> documentSourceMap = (Map<String, Object>) documentSource;
assert !(documentSourceMap).containsKey(OUTPUT_FIELD);
} finally {
wipeOfTestResources(INDEX_NAME, IGNORE_MISSING_PIPELINE_NAME, null, null);
}
Expand Down

0 comments on commit 790b6a2

Please sign in to comment.