From 3712b72de20363bf2e3070dd9be157dd8d00abde Mon Sep 17 00:00:00 2001 From: Petar Dzepina Date: Mon, 7 Nov 2022 02:01:54 +0100 Subject: [PATCH] IT fix Signed-off-by: Petar Dzepina --- .../kotlin/org/opensearch/alerting/MonitorDataSourcesIT.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/alerting/src/test/kotlin/org/opensearch/alerting/MonitorDataSourcesIT.kt b/alerting/src/test/kotlin/org/opensearch/alerting/MonitorDataSourcesIT.kt index 0f54a1e99..619ff6402 100644 --- a/alerting/src/test/kotlin/org/opensearch/alerting/MonitorDataSourcesIT.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/MonitorDataSourcesIT.kt @@ -270,7 +270,6 @@ class MonitorDataSourcesIT : AlertingSingleNodeTestCase() { var executeMonitorResponse = executeMonitor(monitor, id, false) Assert.assertEquals(executeMonitorResponse!!.monitorRunResult.monitorName, monitor.name) Assert.assertEquals(executeMonitorResponse.monitorRunResult.triggerResults.size, 1) - resolveIndex("custom_findings_index-2022.11.06-1") var findings = searchFindings(id, "custom_findings_index*", true) assertEquals("Findings saved for test monitor", 1, findings.size) @@ -286,7 +285,7 @@ class MonitorDataSourcesIT : AlertingSingleNodeTestCase() { assertTrue("Findings saved for test monitor", findings[1].relatedDocIds.contains("2")) val indices = getAllIndicesFromPattern("custom_findings_index*") - Assert.assertTrue(indices.size > 0) + Assert.assertTrue(indices.isNotEmpty()) } fun `test execute pre-existing monitorand update`() {