You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by fj...@apache.org on 2019/09/14 18:55:40 UTC

[incubator-druid] branch master updated: Add diags for flaky CuratorModuleTest (#8528)

This is an automated email from the ASF dual-hosted git repository.

fjy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 5f39ee2  Add diags for flaky CuratorModuleTest (#8528)
5f39ee2 is described below

commit 5f39ee21ff9bbe15f0e2bb022cecb905bec2d8d2
Author: Chi Cao Minh <ch...@imply.io>
AuthorDate: Sat Sep 14 11:55:26 2019 -0700

    Add diags for flaky CuratorModuleTest (#8528)
    
    Add diagnostic messages to debug
    CuratorModuleTest.exitsJvmWhenMaxRetriesExceeded() intermittent test
    failures.
---
 .../src/test/java/org/apache/druid/curator/CuratorModuleTest.java  | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/server/src/test/java/org/apache/druid/curator/CuratorModuleTest.java b/server/src/test/java/org/apache/druid/curator/CuratorModuleTest.java
index 855de80..d17d76c 100644
--- a/server/src/test/java/org/apache/druid/curator/CuratorModuleTest.java
+++ b/server/src/test/java/org/apache/druid/curator/CuratorModuleTest.java
@@ -149,8 +149,9 @@ public final class CuratorModuleTest
     List<LogEvent> loggingEvents = logger.getLogEvents();
     Assert.assertFalse(loggingEvents.isEmpty());
     LogEvent logEvent = loggingEvents.get(0);
-    Assert.assertEquals(Level.ERROR, logEvent.getLevel());
-    Assert.assertEquals("Unhandled error in Curator Framework", logEvent.getMessage().getFormattedMessage());
+    String message = "Logging events: " + loggingEvents;
+    Assert.assertEquals(message, Level.ERROR, logEvent.getLevel());
+    Assert.assertEquals(message, "Unhandled error in Curator Framework", logEvent.getMessage().getFormattedMessage());
   }
 
   @Ignore("Verifies changes in https://github.com/apache/incubator-druid/pull/8458, but overkill for regular testing")
@@ -187,7 +188,7 @@ public final class CuratorModuleTest
     CuratorFramework curatorFramework = injector.getInstance(CuratorFramework.class);
     RetryPolicy retryPolicy = curatorFramework.getZookeeperClient().getRetryPolicy();
     Assert.assertThat(retryPolicy, CoreMatchers.instanceOf(ExponentialBackoffRetry.class));
-    RetryPolicy adjustedRetryPolicy = adjustRetryPolicy((BoundedExponentialBackoffRetry) retryPolicy, 0);
+    RetryPolicy adjustedRetryPolicy = adjustRetryPolicy((BoundedExponentialBackoffRetry) retryPolicy, maxRetries);
     curatorFramework.getZookeeperClient().setRetryPolicy(adjustedRetryPolicy);
     return curatorFramework;
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org