Skip to content

Commit

Permalink
fix flaky multi-node tests
Browse files Browse the repository at this point in the history
Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
  • Loading branch information
sbcd90 committed Apr 18, 2024
1 parent d7562b1 commit 68c40e1
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 @@ -251,7 +251,7 @@ class TransportGetWorkflowAlertsAction @Inject constructor(
searchRequest.source().sort(sortBuilder).size(tableProp.size).from(tableProp.startIndex)
}
queryBuilder.must(QueryBuilders.termsQuery("_id", associatedAlertIds))
queryBuilder.must(QueryBuilders.termQuery(Alert.STATE_FIELD, Alert.State.AUDIT))
queryBuilder.must(QueryBuilders.termQuery(Alert.STATE_FIELD, Alert.State.AUDIT.name))
searchRequest.source().query(queryBuilder)
val response: SearchResponse = client.suspendUntil { search(searchRequest, it) }
associatedAlerts.addAll(parseAlertsFromSearchResponse(response))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,9 @@ object CompositeWorkflowRunner : WorkflowRunner() {

fun getDelegateMonitorAlertState(
workflow: Workflow,
): Alert.State {
): String {
return if (workflow.triggers.isNotEmpty()) {
Alert.State.AUDIT
} else Alert.State.ACTIVE
Alert.State.AUDIT.name
} else Alert.State.ACTIVE.name
}
}

0 comments on commit 68c40e1

Please sign in to comment.