diff --git a/x-pack/qa/smoke-test-watcher-with-security/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherWithSecurityIT.java b/x-pack/qa/smoke-test-watcher-with-security/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherWithSecurityIT.java index 341ae75fa5a..fd09ec927d5 100644 --- a/x-pack/qa/smoke-test-watcher-with-security/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherWithSecurityIT.java +++ b/x-pack/qa/smoke-test-watcher-with-security/src/test/java/org/elasticsearch/smoketest/SmokeTestWatcherWithSecurityIT.java @@ -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)); }