diff --git a/plugins/transport/memcached/src/test/java/org/elasticsearch/memcached/test/AbstractMemcachedActionsTests.java b/plugins/transport/memcached/src/test/java/org/elasticsearch/memcached/test/AbstractMemcachedActionsTests.java index 2a5bcbd2c7c..51f02c4606c 100644 --- a/plugins/transport/memcached/src/test/java/org/elasticsearch/memcached/test/AbstractMemcachedActionsTests.java +++ b/plugins/transport/memcached/src/test/java/org/elasticsearch/memcached/test/AbstractMemcachedActionsTests.java @@ -20,6 +20,7 @@ package org.elasticsearch.memcached.test; import net.spy.memcached.MemcachedClient; +import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; import org.elasticsearch.node.Node; import org.hamcrest.Matchers; import org.testng.annotations.AfterMethod; @@ -62,6 +63,9 @@ public abstract class AbstractMemcachedActionsTests { Future setResult = memcachedClient.set("/test/person/1", 0, jsonBuilder().startObject().field("test", "value").endObject().copiedBytes()); assertThat(setResult.get(10, TimeUnit.SECONDS), equalTo(true)); + ClusterHealthResponse health = node.client().admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(); + assertThat(health.timedOut(), equalTo(false)); + String getResult = (String) memcachedClient.get("/_refresh"); System.out.println("REFRESH " + getResult); assertThat(getResult, Matchers.containsString("\"total\":10"));