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 71c92166136..041dce8559e 100644 --- a/watcher/src/test/java/org/elasticsearch/watcher/actions/TimeThrottleIntegrationTests.java +++ b/watcher/src/test/java/org/elasticsearch/watcher/actions/TimeThrottleIntegrationTests.java @@ -49,6 +49,10 @@ public class TimeThrottleIntegrationTests extends AbstractWatcherIntegrationTest return eventIndexResponse; } + @Override + protected boolean enableShield() { + return false; + } @Test diff --git a/watcher/src/test/java/org/elasticsearch/watcher/test/AbstractWatcherIntegrationTestCase.java b/watcher/src/test/java/org/elasticsearch/watcher/test/AbstractWatcherIntegrationTestCase.java index 32ee5d8d37c..f64916b3021 100644 --- a/watcher/src/test/java/org/elasticsearch/watcher/test/AbstractWatcherIntegrationTestCase.java +++ b/watcher/src/test/java/org/elasticsearch/watcher/test/AbstractWatcherIntegrationTestCase.java @@ -255,11 +255,11 @@ public abstract class AbstractWatcherIntegrationTestCase extends ESIntegTestCase } protected long docCount(String index, String type, SearchSourceBuilder source) { - SearchRequestBuilder builder = client().prepareSearch(index).setSize(0); + SearchRequestBuilder builder = client().prepareSearch(index) + .internalBuilder(source).setSize(0); if (type != null) { builder.setTypes(type); } - builder.setSource(source.buildAsBytes()); return builder.get().getHits().getTotalHits(); }