From 0fce04411bcba9891e094a18fa7e5ef5513ff05e Mon Sep 17 00:00:00 2001 From: Riya Saxena Date: Tue, 17 Dec 2024 12:12:50 -0800 Subject: [PATCH] tests fix Signed-off-by: Riya Saxena --- .../kotlin/org/opensearch/alerting/DocumentMonitorRunnerIT.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alerting/src/test/kotlin/org/opensearch/alerting/DocumentMonitorRunnerIT.kt b/alerting/src/test/kotlin/org/opensearch/alerting/DocumentMonitorRunnerIT.kt index f6ef9309a..53bb54a53 100644 --- a/alerting/src/test/kotlin/org/opensearch/alerting/DocumentMonitorRunnerIT.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/DocumentMonitorRunnerIT.kt @@ -2791,7 +2791,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() { indexDoc(aliasName, "6", testDoc) indexDoc(aliasName, "7", testDoc) OpenSearchTestCase.waitUntil( - { searchFindings(monitor).size == 6 }, 2, TimeUnit.MINUTES + { searchFindings(monitor).size == 6 && searchAlertsWithFilter(monitor).size == 1 }, 2, TimeUnit.MINUTES ) rolloverDatastream(aliasName) @@ -2802,7 +2802,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() { indexDoc(aliasName, "16", testDoc) indexDoc(aliasName, "17", testDoc) OpenSearchTestCase.waitUntil( - { searchFindings(monitor).size == 6 }, 2, TimeUnit.MINUTES + { searchFindings(monitor).size == 6 && searchAlertsWithFilter(monitor).size == 1 }, 2, TimeUnit.MINUTES ) deleteDataStream(aliasName)