From 19f8d0f6236db92d231de40a398b466d73baf061 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Thu, 26 Jan 2012 03:58:52 +0000 Subject: [PATCH] if test fails, print zk layout git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1236037 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/org/apache/solr/cloud/ZkControllerTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java b/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java index fc1a7b61beb..65b62766d6c 100644 --- a/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/ZkControllerTest.java @@ -102,6 +102,7 @@ public class ZkControllerTest extends SolrTestCaseJ4 { ZkTestServer server = new ZkTestServer(zkDir); ZkController zkController = null; + boolean testFinished = false; try { server.run(); @@ -127,8 +128,12 @@ public class ZkControllerTest extends SolrTestCaseJ4 { if (DEBUG) { zkController.printLayoutToStdOut(); } - + testFinished = true; } finally { + if (testFinished) { + zkController.getZkClient().printLayoutToStdOut(); + } + if (zkController != null) { zkController.close(); }