From aa2bc27bacc3b2cc7a37c2e023cc5e3118222933 Mon Sep 17 00:00:00 2001 From: Shalin Shekhar Mangar Date: Tue, 17 Feb 2015 17:31:24 +0000 Subject: [PATCH] SOLR-6956: A better message for DeleteReplicaTest failures git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1660453 13f79535-47bb-0310-9956-ffa450edef68 --- solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java b/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java index 18ac8e8549b..915cc69248e 100644 --- a/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/DeleteReplicaTest.java @@ -117,7 +117,7 @@ public class DeleteReplicaTest extends AbstractFullDistribZkTestBase { fail("Should have thrown an exception here because the replica is NOT down"); } catch (SolrException se) { assertEquals("Should see 400 here ", se.code(), 400); - assertTrue("Should have had a good message here", se.getMessage().contains("with onlyIfDown='true', but state is 'active'")); + assertTrue("Expected DeleteReplica to fail because node state is 'active' but returned message was: " + se.getMessage(), se.getMessage().contains("with onlyIfDown='true', but state is 'active'")); // This bit is a little weak in that if we're screwing up and actually deleting the replica, we might get back // here _before_ the datadir is deleted. But I'd rather not introduce a delay here. assertTrue("dataDir for " + replica1.getName() + " should NOT have been deleted by deleteReplica API with onlyIfDown='true'",