Only query for watcher history docs with the expected state,
otherwise other history docs can be returned, which may not have the expected state, and this test only checks the first hit. Relates to #30777
This commit is contained in:
parent
e0e35b7feb
commit
8c78404814
|
@ -181,9 +181,7 @@ public class SmokeTestWatcherWithSecurityIT extends ESRestTestCase {
|
|||
}
|
||||
|
||||
// check history, after watch has fired
|
||||
ObjectPath objectPath = getWatchHistoryEntry(watchId);
|
||||
String state = objectPath.evaluate("hits.hits.0._source.state");
|
||||
assertThat(state, is("execution_not_needed"));
|
||||
ObjectPath objectPath = getWatchHistoryEntry(watchId, "execution_not_needed");
|
||||
boolean conditionMet = objectPath.evaluate("hits.hits.0._source.result.condition.met");
|
||||
assertThat(conditionMet, is(false));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue