[TEST] Clean up watch created by stats test.
This may have resulted in a watch being run during shutdown. Original commit: elastic/x-pack-elasticsearch@2631690f1a
This commit is contained in:
parent
0325aeeb5f
commit
a3c5292b24
|
@ -15,6 +15,7 @@ import org.elasticsearch.watcher.client.WatcherClient;
|
||||||
import org.elasticsearch.watcher.condition.ConditionBuilders;
|
import org.elasticsearch.watcher.condition.ConditionBuilders;
|
||||||
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
|
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
|
||||||
import org.elasticsearch.watcher.test.WatcherTestUtils;
|
import org.elasticsearch.watcher.test.WatcherTestUtils;
|
||||||
|
import org.elasticsearch.watcher.transport.actions.delete.DeleteWatchResponse;
|
||||||
import org.elasticsearch.watcher.transport.actions.stats.WatcherStatsRequest;
|
import org.elasticsearch.watcher.transport.actions.stats.WatcherStatsRequest;
|
||||||
import org.elasticsearch.watcher.transport.actions.stats.WatcherStatsResponse;
|
import org.elasticsearch.watcher.transport.actions.stats.WatcherStatsResponse;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -81,5 +82,8 @@ public class WatcherStatsTests extends AbstractWatcherIntegrationTests {
|
||||||
assertThat(response.getWatcherState(), is(WatcherState.STARTED));
|
assertThat(response.getWatcherState(), is(WatcherState.STARTED));
|
||||||
assertThat(response.getWatchesCount(), is(1L));
|
assertThat(response.getWatchesCount(), is(1L));
|
||||||
assertThat(response.getThreadPoolMaxSize(), greaterThan(0L));
|
assertThat(response.getThreadPoolMaxSize(), greaterThan(0L));
|
||||||
|
|
||||||
|
DeleteWatchResponse deleteWatchResponse = watcherClient.prepareDeleteWatch("_name").get();
|
||||||
|
assertThat(deleteWatchResponse.isFound(), is(true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue