test: make sure the watch doesn't get throttled

Closes elastic/elasticsearch#640

Original commit: elastic/x-pack-elasticsearch@f1041f6929
This commit is contained in:
Martijn van Groningen 2015-09-18 10:58:51 +02:00
parent fdae10ff74
commit 1e5d2cac11
1 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,7 @@
package org.elasticsearch.watcher.test.integration; package org.elasticsearch.watcher.test.integration;
import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.test.junit.annotations.TestLogging; import org.elasticsearch.test.junit.annotations.TestLogging;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.elasticsearch.watcher.actions.logging.LoggingAction; import org.elasticsearch.watcher.actions.logging.LoggingAction;
@ -91,10 +92,11 @@ public class WatchMetadataTests extends AbstractWatcherIntegrationTestCase {
watcherClient().preparePutWatch("_name") watcherClient().preparePutWatch("_name")
.setSource(watchBuilder() .setSource(watchBuilder()
.trigger(schedule(cron("0/5 * * * * ? *"))) .trigger(schedule(cron("0 0 0 1 1 ? 2050")))
.input(searchInput(WatcherTestUtils.newInputSearchRequest("my-index").source(searchSource().query(matchAllQuery())))) .input(searchInput(WatcherTestUtils.newInputSearchRequest("my-index").source(searchSource().query(matchAllQuery()))))
.condition(new AlwaysCondition()) .condition(new AlwaysCondition())
.addAction("testLogger", loggingAction) .addAction("testLogger", loggingAction)
.defaultThrottlePeriod(TimeValue.timeValueSeconds(0))
.metadata(metadata)) .metadata(metadata))
.get(); .get();