From 34a0de4b38733eab0a40f3abbf7b89d2501dd2fb Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Thu, 7 May 2015 00:54:44 +0200 Subject: [PATCH] test: after first elected master node has been stopped assert that watcher is started and only running once. Original commit: elastic/x-pack-elasticsearch@e193b80215f08528ad69e63fd8372802a8e402e1 --- .../watcher/test/integration/NoMasterNodeTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/java/org/elasticsearch/watcher/test/integration/NoMasterNodeTests.java b/src/test/java/org/elasticsearch/watcher/test/integration/NoMasterNodeTests.java index 11b88a1af05..e57617cc973 100644 --- a/src/test/java/org/elasticsearch/watcher/test/integration/NoMasterNodeTests.java +++ b/src/test/java/org/elasticsearch/watcher/test/integration/NoMasterNodeTests.java @@ -155,6 +155,8 @@ public class NoMasterNodeTests extends AbstractWatcherIntegrationTests { // We still have 2 master node, we should recover from this failure: internalTestCluster().stopCurrentMasterNode(); + ensureWatcherStarted(false); + ensureWatcherOnlyRunningOnce(); assertWatchWithMinimumPerformedActionsCount("_watch_id", 2, false); // Stop the elected master, no new master will be elected b/c of m_m_n is set to 2