You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2017/09/27 17:26:13 UTC

lucene-solr:feature/autoscaling: SOLR-11407: Add some debugging information when the test fails.

Repository: lucene-solr
Updated Branches:
  refs/heads/feature/autoscaling d47af823e -> fba51f34d


SOLR-11407: Add some debugging information when the test fails.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/fba51f34
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/fba51f34
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/fba51f34

Branch: refs/heads/feature/autoscaling
Commit: fba51f34d7506c8c9d23d139900600949e34f732
Parents: d47af82
Author: Andrzej Bialecki <ab...@apache.org>
Authored: Wed Sep 27 19:25:15 2017 +0200
Committer: Andrzej Bialecki <ab...@apache.org>
Committed: Wed Sep 27 19:25:15 2017 +0200

----------------------------------------------------------------------
 .../handler/admin/AutoscalingHistoryHandlerTest.java    | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/fba51f34/solr/core/src/test/org/apache/solr/handler/admin/AutoscalingHistoryHandlerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/AutoscalingHistoryHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/admin/AutoscalingHistoryHandlerTest.java
index 39dd5a7..56c920e 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/AutoscalingHistoryHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/AutoscalingHistoryHandlerTest.java
@@ -175,7 +175,9 @@ public class AutoscalingHistoryHandlerTest extends SolrCloudTestCase {
     boolean await = actionFiredLatch.await(60, TimeUnit.SECONDS);
     assertTrue("action did not execute", await);
     // commit on the history collection
+    Thread.sleep(2000);
     solrClient.commit(CollectionAdminParams.SYSTEM_COLL);
+    Thread.sleep(2000);
     // verify that new docs exist
     ModifiableSolrParams query = params(CommonParams.Q, "type:" + SystemLogListener.DOC_TYPE,
       CommonParams.FQ, "event.source_s:" + PREFIX + "_node_added_trigger");
@@ -185,11 +187,13 @@ public class AutoscalingHistoryHandlerTest extends SolrCloudTestCase {
 
     query = params(CommonParams.QT, CommonParams.AUTOSCALING_HISTORY_PATH,
       AutoscalingHistoryHandler.TRIGGER_PARAM, PREFIX + "_node_added_trigger");
-    docs = solrClient.query(query).getResults();
+    QueryResponse rsp = solrClient.query(query);
+    docs = rsp.getResults();
     if (docs.size() != 8) {
-      zkClient().printLayoutToStdOut();
-      query = params(CommonParams.QT, CommonParams.AUTOSCALING_DIAGNOSTICS_PATH);
-      log.info("Diagnostic output: ", solrClient.query(query).getResponse());
+      log.info("Cluster state: " + solrClient.getZkStateReader().getClusterState());
+      query = params(CommonParams.QT, CommonParams.AUTOSCALING_HISTORY_PATH);
+      log.info("Wrong response: ", rsp);
+      log.info("Full response: " + solrClient.query(query));
     }
     assertEquals(8, docs.size());