diff --git a/qa/pom.xml b/qa/pom.xml
index 3d10b2e7cfe..b5061593262 100644
--- a/qa/pom.xml
+++ b/qa/pom.xml
@@ -173,12 +173,6 @@
commons-cli
provided
-
- org.codehaus.groovy
- groovy-all
- indy
- provided
-
log4j
log4j
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/actions/TimeThrottleIntegrationTests.java b/watcher/src/test/java/org/elasticsearch/watcher/actions/TimeThrottleIntegrationTests.java
index 041dce8559e..f63e9d72ed5 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/actions/TimeThrottleIntegrationTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/actions/TimeThrottleIntegrationTests.java
@@ -6,6 +6,7 @@
package org.elasticsearch.watcher.actions;
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.action.index.IndexResponse;
import org.joda.time.DateTime;
import org.elasticsearch.common.unit.TimeValue;
@@ -35,6 +36,7 @@ import static org.hamcrest.Matchers.is;
/**
*/
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class TimeThrottleIntegrationTests extends AbstractWatcherIntegrationTestCase {
private IndexResponse indexTestDoc() {
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/actions/email/EmailActionIntegrationTests.java b/watcher/src/test/java/org/elasticsearch/watcher/actions/email/EmailActionIntegrationTests.java
index 626747b0a9b..f3ab878d70a 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/actions/email/EmailActionIntegrationTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/actions/email/EmailActionIntegrationTests.java
@@ -5,6 +5,7 @@
*/
package org.elasticsearch.watcher.actions.email;
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.test.ESIntegTestCase;
@@ -18,6 +19,7 @@ import org.junit.After;
import org.junit.Test;
import javax.mail.internet.MimeMessage;
+
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -35,6 +37,7 @@ import static org.hamcrest.Matchers.equalTo;
@TestLogging("subethamail:TRACE,watcher:TRACE")
@ESIntegTestCase.ClusterScope(scope = SUITE, numClientNodes = 0, transportClientRatio = 0, randomDynamicTemplates = false, numDataNodes = 1)
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class EmailActionIntegrationTests extends AbstractWatcherIntegrationTestCase {
static final String USERNAME = "_user";
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/actions/index/IndexActionIntegrationTests.java b/watcher/src/test/java/org/elasticsearch/watcher/actions/index/IndexActionIntegrationTests.java
index b00ce9f8283..7a92d9cb2e0 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/actions/index/IndexActionIntegrationTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/actions/index/IndexActionIntegrationTests.java
@@ -5,6 +5,7 @@
*/
package org.elasticsearch.watcher.actions.index;
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.SearchType;
@@ -37,6 +38,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class IndexActionIntegrationTests extends AbstractWatcherIntegrationTestCase {
@Test
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/actions/webhook/WebhookActionTests.java b/watcher/src/test/java/org/elasticsearch/watcher/actions/webhook/WebhookActionTests.java
index c59a0be689e..2e391101a91 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/actions/webhook/WebhookActionTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/actions/webhook/WebhookActionTests.java
@@ -6,6 +6,8 @@
package org.elasticsearch.watcher.actions.webhook;
import com.google.common.collect.ImmutableMap;
+
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.ToXContent;
@@ -40,6 +42,7 @@ import org.junit.Before;
import org.junit.Test;
import javax.mail.internet.AddressException;
+
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
@@ -57,6 +60,7 @@ import static org.mockito.Mockito.*;
/**
*/
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class WebhookActionTests extends ESTestCase {
static final String TEST_HOST = "test.com";
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/condition/script/ScriptConditionSearchTests.java b/watcher/src/test/java/org/elasticsearch/watcher/condition/script/ScriptConditionSearchTests.java
index 5e59306282b..4541bd076b0 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/condition/script/ScriptConditionSearchTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/condition/script/ScriptConditionSearchTests.java
@@ -5,6 +5,7 @@
*/
package org.elasticsearch.watcher.condition.script;
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.ShardSearchFailure;
import org.elasticsearch.common.text.StringText;
@@ -32,6 +33,7 @@ import static org.mockito.Mockito.when;
/**
*/
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class ScriptConditionSearchTests extends AbstractWatcherIntegrationTestCase {
private ThreadPool tp = null;
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/condition/script/ScriptConditionTests.java b/watcher/src/test/java/org/elasticsearch/watcher/condition/script/ScriptConditionTests.java
index 3168dcbda8e..6a6a1620e0d 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/condition/script/ScriptConditionTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/condition/script/ScriptConditionTests.java
@@ -7,6 +7,8 @@ package org.elasticsearch.watcher.condition.script;
import com.google.common.collect.ImmutableMap;
+
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.ShardSearchFailure;
@@ -41,6 +43,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class ScriptConditionTests extends ESTestCase {
ThreadPool tp = null;
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/execution/ManualExecutionTests.java b/watcher/src/test/java/org/elasticsearch/watcher/execution/ManualExecutionTests.java
index 0917159f6aa..fa1c90d3f2e 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/execution/ManualExecutionTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/execution/ManualExecutionTests.java
@@ -5,6 +5,7 @@
*/
package org.elasticsearch.watcher.execution;
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.common.unit.TimeValue;
@@ -66,6 +67,7 @@ import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.startsWith;
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class ManualExecutionTests extends AbstractWatcherIntegrationTestCase {
@Override
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/execution/TriggeredWatchTests.java b/watcher/src/test/java/org/elasticsearch/watcher/execution/TriggeredWatchTests.java
index 7599f2fa22f..7ff54e3361d 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/execution/TriggeredWatchTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/execution/TriggeredWatchTests.java
@@ -5,6 +5,7 @@
*/
package org.elasticsearch.watcher.execution;
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
@@ -20,6 +21,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class TriggeredWatchTests extends AbstractWatcherIntegrationTestCase {
@Test
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/history/HistoryTemplateTransformMappingsTests.java b/watcher/src/test/java/org/elasticsearch/watcher/history/HistoryTemplateTransformMappingsTests.java
index 5cc4931880e..2c9829657b2 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/history/HistoryTemplateTransformMappingsTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/history/HistoryTemplateTransformMappingsTests.java
@@ -6,6 +6,8 @@
package org.elasticsearch.watcher.history;
import com.carrotsearch.hppc.cursors.ObjectObjectCursor;
+
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse;
import org.elasticsearch.cluster.metadata.MappingMetaData;
import org.elasticsearch.common.collect.ImmutableOpenMap;
@@ -32,6 +34,7 @@ import static org.hamcrest.Matchers.notNullValue;
* This test makes sure that the http host and path fields in the watch_record action result are
* not analyzed so they can be used in aggregations
*/
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class HistoryTemplateTransformMappingsTests extends AbstractWatcherIntegrationTestCase {
@Override
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/input/http/HttpInputIntegrationTests.java b/watcher/src/test/java/org/elasticsearch/watcher/input/http/HttpInputIntegrationTests.java
index f66db95cc20..af999107741 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/input/http/HttpInputIntegrationTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/input/http/HttpInputIntegrationTests.java
@@ -37,6 +37,9 @@ import static org.elasticsearch.watcher.trigger.TriggerBuilders.schedule;
import static org.elasticsearch.watcher.trigger.schedule.Schedules.interval;
import static org.hamcrest.Matchers.equalTo;
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
+
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class HttpInputIntegrationTests extends AbstractWatcherIntegrationTestCase {
@Override
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/test/WatcherTestUtils.java b/watcher/src/test/java/org/elasticsearch/watcher/test/WatcherTestUtils.java
index 57c3ef511ec..e7bcdefd46a 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/test/WatcherTestUtils.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/test/WatcherTestUtils.java
@@ -20,7 +20,6 @@ import org.elasticsearch.env.Environment;
import org.elasticsearch.script.ScriptContextRegistry;
import org.elasticsearch.script.ScriptEngineService;
import org.elasticsearch.script.ScriptService;
-import org.elasticsearch.script.groovy.GroovyScriptEngineService;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.threadpool.ThreadPool;
@@ -236,11 +235,9 @@ public final class WatcherTestUtils {
.put("script.indexed", "on")
.put("path.home", createTempDir())
.build();
- GroovyScriptEngineService groovyScriptEngineService = new GroovyScriptEngineService(settings);
XMustacheScriptEngineService mustacheScriptEngineService = new XMustacheScriptEngineService(settings);
Set engineServiceSet = new HashSet<>();
engineServiceSet.add(mustacheScriptEngineService);
- engineServiceSet.add(groovyScriptEngineService);
ScriptContextRegistry registry = new ScriptContextRegistry(Arrays.asList(ScriptServiceProxy.INSTANCE));
return ScriptServiceProxy.of(new ScriptService(settings, new Environment(settings), engineServiceSet, new ResourceWatcherService(settings, tp), registry));
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/test/integration/BasicWatcherTests.java b/watcher/src/test/java/org/elasticsearch/watcher/test/integration/BasicWatcherTests.java
index c6f55df869b..224fdaaefe0 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/test/integration/BasicWatcherTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/test/integration/BasicWatcherTests.java
@@ -5,6 +5,7 @@
*/
package org.elasticsearch.watcher.test.integration;
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchRequestBuilder;
@@ -55,6 +56,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
@TestLogging("watcher.trigger.schedule:TRACE")
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class BasicWatcherTests extends AbstractWatcherIntegrationTestCase {
@Test
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/test/integration/BootStrapTests.java b/watcher/src/test/java/org/elasticsearch/watcher/test/integration/BootStrapTests.java
index 413c82970e4..3c7b5f286df 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/test/integration/BootStrapTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/test/integration/BootStrapTests.java
@@ -5,6 +5,7 @@
*/
package org.elasticsearch.watcher.test.integration;
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.action.WriteConsistencyLevel;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
@@ -49,6 +50,7 @@ import static org.hamcrest.core.IsEqual.equalTo;
/**
*/
@TestLogging("watcher:TRACE")
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class BootStrapTests extends AbstractWatcherIntegrationTestCase {
@Override
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/test/integration/ExecutionVarsIntegrationTests.java b/watcher/src/test/java/org/elasticsearch/watcher/test/integration/ExecutionVarsIntegrationTests.java
index 9d5ed51036c..4fb84c2c34c 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/test/integration/ExecutionVarsIntegrationTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/test/integration/ExecutionVarsIntegrationTests.java
@@ -5,6 +5,7 @@
*/
package org.elasticsearch.watcher.test.integration;
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.action.search.SearchRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.util.Callback;
@@ -32,6 +33,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*/
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class ExecutionVarsIntegrationTests extends AbstractWatcherIntegrationTestCase {
@Override
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/test/integration/NoMasterNodeTests.java b/watcher/src/test/java/org/elasticsearch/watcher/test/integration/NoMasterNodeTests.java
index 77946ed1129..7907e421004 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/test/integration/NoMasterNodeTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/test/integration/NoMasterNodeTests.java
@@ -5,6 +5,7 @@
*/
package org.elasticsearch.watcher.test.integration;
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.ExceptionsHelper;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.client.Client;
@@ -53,6 +54,7 @@ import static org.hamcrest.core.Is.is;
@TestLogging("discovery:TRACE,watcher:TRACE")
@ClusterScope(scope = TEST, numClientNodes = 0, transportClientRatio = 0, randomDynamicTemplates = false, numDataNodes = 0)
@SuppressLocalMode
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class NoMasterNodeTests extends AbstractWatcherIntegrationTestCase {
private ClusterDiscoveryConfiguration.UnicastZen config;
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/test/integration/WatchMetadataTests.java b/watcher/src/test/java/org/elasticsearch/watcher/test/integration/WatchMetadataTests.java
index f393797b369..897f20e2a60 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/test/integration/WatchMetadataTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/test/integration/WatchMetadataTests.java
@@ -5,6 +5,7 @@
*/
package org.elasticsearch.watcher.test.integration;
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.test.junit.annotations.TestLogging;
@@ -44,6 +45,7 @@ import static org.hamcrest.Matchers.greaterThan;
/**
*
*/
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class WatchMetadataTests extends AbstractWatcherIntegrationTestCase {
@Test
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/transform/TransformIntegrationTests.java b/watcher/src/test/java/org/elasticsearch/watcher/transform/TransformIntegrationTests.java
index 0d4a64445b3..c9e1c6366e4 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/transform/TransformIntegrationTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/transform/TransformIntegrationTests.java
@@ -5,6 +5,7 @@
*/
package org.elasticsearch.watcher.transform;
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.collect.MapBuilder;
@@ -38,6 +39,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class TransformIntegrationTests extends AbstractWatcherIntegrationTestCase {
@Override
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/transport/action/ack/WatchAckTests.java b/watcher/src/test/java/org/elasticsearch/watcher/transport/action/ack/WatchAckTests.java
index a0937ca7dad..58b6a210f14 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/transport/action/ack/WatchAckTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/transport/action/ack/WatchAckTests.java
@@ -6,6 +6,7 @@
package org.elasticsearch.watcher.transport.action.ack;
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.action.delete.DeleteResponse;
import org.elasticsearch.action.get.GetRequest;
@@ -45,6 +46,7 @@ import static org.hamcrest.core.IsEqual.equalTo;
/**
*/
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class WatchAckTests extends AbstractWatcherIntegrationTestCase {
private IndexResponse indexTestDoc() {
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/transport/action/delete/ForceDeleteWatchTests.java b/watcher/src/test/java/org/elasticsearch/watcher/transport/action/delete/ForceDeleteWatchTests.java
index e0f162ace65..f49bc73231d 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/transport/action/delete/ForceDeleteWatchTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/transport/action/delete/ForceDeleteWatchTests.java
@@ -5,6 +5,7 @@
*/
package org.elasticsearch.watcher.transport.action.delete;
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.watcher.support.Script;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
@@ -23,6 +24,7 @@ import static org.hamcrest.Matchers.is;
/**
*/
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class ForceDeleteWatchTests extends AbstractWatcherIntegrationTestCase {
//Disable time warping for the force delete long running watch test
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/transport/action/stats/SlowWatchStatsTests.java b/watcher/src/test/java/org/elasticsearch/watcher/transport/action/stats/SlowWatchStatsTests.java
index 5370539fbad..0c730a5f72f 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/transport/action/stats/SlowWatchStatsTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/transport/action/stats/SlowWatchStatsTests.java
@@ -5,6 +5,7 @@
*/
package org.elasticsearch.watcher.transport.action.stats;
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.EsExecutors;
import org.elasticsearch.test.ESIntegTestCase;
@@ -33,6 +34,7 @@ import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
@ESIntegTestCase.ClusterScope(scope = TEST, numClientNodes = 0, transportClientRatio = 0, randomDynamicTemplates = false, numDataNodes = 2)
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class SlowWatchStatsTests extends AbstractWatcherIntegrationTestCase {
@Override
diff --git a/watcher/src/test/java/org/elasticsearch/watcher/transport/action/stats/WatcherStatsTests.java b/watcher/src/test/java/org/elasticsearch/watcher/transport/action/stats/WatcherStatsTests.java
index bbc809651f3..032a3cd3753 100644
--- a/watcher/src/test/java/org/elasticsearch/watcher/transport/action/stats/WatcherStatsTests.java
+++ b/watcher/src/test/java/org/elasticsearch/watcher/transport/action/stats/WatcherStatsTests.java
@@ -5,6 +5,7 @@
*/
package org.elasticsearch.watcher.transport.action.stats;
+import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
@@ -38,6 +39,7 @@ import static org.hamcrest.core.IsEqual.equalTo;
*/
@ClusterScope(scope = TEST, numClientNodes = 0, transportClientRatio = 0, randomDynamicTemplates = false)
@TestLogging("watcher:TRACE")
+@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
public class WatcherStatsTests extends AbstractWatcherIntegrationTestCase {
@Test