Take fragile test out of the loop

UpdateNumberOfReplicasTests#simpleUpdateNumberOfReplicasTests is very
fragile due to executing searches based on dated knowledge of
the cluster state and calling shards that have been relocating away in
the mean time. A fix is on the way.
This commit is contained in:
Simon Willnauer 2013-08-01 15:40:04 +02:00
parent 300db594aa
commit f2f70a415a
1 changed files with 17 additions and 0 deletions

View File

@ -19,6 +19,7 @@
package org.elasticsearch.test.integration.indices.settings; package org.elasticsearch.test.integration.indices.settings;
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus; import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus;
import org.elasticsearch.action.count.CountResponse; import org.elasticsearch.action.count.CountResponse;
@ -37,7 +38,23 @@ import static org.hamcrest.Matchers.equalTo;
*/ */
public class UpdateNumberOfReplicasTests extends AbstractSharedClusterTest { public class UpdateNumberOfReplicasTests extends AbstractSharedClusterTest {
/*
* Comment from Boaz on the dev@ list:
*
* A short update on the failing
* UpdateNumberOfReplicasTest.simpleUpdateNumberOfReplicasTests - Shay and I
* pinned down the source of the problem - it's caused by making searches
* based on dated knowledge of the cluster state and calling shards that
* have been relocating away in the mean time.
*
* I'll be working on a a fix (when searching on a shard that is in the
* process of relocating, fail over to the relocation target if the search
* to the relocation source failed), but will it take a couple of days to
* complete.
*/
@Test @Test
@AwaitsFix(bugUrl = "Boaz is on it ;)")
public void simpleUpdateNumberOfReplicasTests() throws Exception { public void simpleUpdateNumberOfReplicasTests() throws Exception {
logger.info("Creating index test"); logger.info("Creating index test");
prepareCreate("test", 2).execute().actionGet(); prepareCreate("test", 2).execute().actionGet();