Skip to content

Commit

Permalink
fixing boolean supplier correctly
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Choi <[email protected]>
  • Loading branch information
JacobCho-i committed Nov 1, 2023
1 parent e650f15 commit 19e5ded
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@ class MonitorRunnerServiceIT : AlertingRestTestCase() {

// Execute Monitor and check that both Alerts were updated
OpenSearchTestCase.waitUntil({
return@waitUntil (searchAlerts(monitor, AlertIndices.ALL_ALERT_INDEX_PATTERN).size == 2)
return@waitUntil false
}, 200, TimeUnit.MILLISECONDS)
executeMonitor(monitor.id)
currentAlerts = searchAlerts(monitor, AlertIndices.ALL_ALERT_INDEX_PATTERN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,9 @@ class MonitorRestApiIT : AlertingRestTestCase() {

// Wait 5 seconds for event to be processed and alerts moved
OpenSearchTestCase.waitUntil({
val alerts = searchAlerts(monitor)
val historyAlerts = searchAlerts(monitor, AlertIndices.ALERT_HISTORY_WRITE_INDEX)
return@waitUntil (historyAlerts.size == 1)
return@waitUntil (alerts.isEmpty() && historyAlerts.size == 1)
}, 5, TimeUnit.SECONDS)

val alerts = searchAlerts(monitor)
Expand Down Expand Up @@ -846,8 +847,7 @@ class MonitorRestApiIT : AlertingRestTestCase() {

// Wait 5 seconds for event to be processed and alerts moved
OpenSearchTestCase.waitUntil({
val historyAlerts = searchAlerts(monitor, AlertIndices.ALERT_HISTORY_WRITE_INDEX)
return@waitUntil (historyAlerts.size == 1)
return@waitUntil false
}, 5, TimeUnit.SECONDS)

val alerts = searchAlerts(monitor)
Expand Down

0 comments on commit 19e5ded

Please sign in to comment.