From 47907b7093e518f204ae563f567df1b8475d03f8 Mon Sep 17 00:00:00 2001 From: Ali Beyad Date: Mon, 2 Jan 2017 15:23:24 -0500 Subject: [PATCH] [TEST] fix explain API test to allow for either awaiting info state or no valid shard copy --- .../admin/cluster/allocation/ClusterAllocationExplainIT.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/test/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java b/core/src/test/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java index f4ce1ec1baa..99b729ee1d9 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java +++ b/core/src/test/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java @@ -109,7 +109,8 @@ public final class ClusterAllocationExplainIT extends ESIntegTestCase { // verify decision objects assertTrue(allocateDecision.isDecisionTaken()); assertFalse(moveDecision.isDecisionTaken()); - assertEquals(AllocationDecision.NO_VALID_SHARD_COPY, allocateDecision.getAllocationDecision()); + assertTrue(allocateDecision.getAllocationDecision() == AllocationDecision.NO_VALID_SHARD_COPY + || allocateDecision.getAllocationDecision() == AllocationDecision.AWAITING_INFO); assertEquals("cannot allocate because a previous copy of the primary shard existed but can no longer be " + "found on the nodes in the cluster", allocateDecision.getExplanation()); assertNull(allocateDecision.getAllocationId());