curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [1/2] curator git commit: removed some test code
Date Sun, 23 Aug 2015 00:07:07 GMT
Repository: curator
Updated Branches:
  refs/heads/CURATOR-247 ec2f9bd55 -> e23913701


removed some test code


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/6381ccb6
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/6381ccb6
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/6381ccb6

Branch: refs/heads/CURATOR-247
Commit: 6381ccb6536f4710248a50ae5d0313399bbfe858
Parents: ec2f9bd
Author: randgalt <randgalt@apache.org>
Authored: Sat Aug 22 17:50:09 2015 -0500
Committer: randgalt <randgalt@apache.org>
Committed: Sat Aug 22 17:50:09 2015 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/curator/RetryLoop.java       | 10 +++-------
 .../main/java/org/apache/curator/utils/DebugUtils.java    |  1 -
 .../java/org/apache/curator/test/BaseClassForTests.java   |  5 -----
 3 files changed, 3 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/6381ccb6/curator-client/src/main/java/org/apache/curator/RetryLoop.java
----------------------------------------------------------------------
diff --git a/curator-client/src/main/java/org/apache/curator/RetryLoop.java b/curator-client/src/main/java/org/apache/curator/RetryLoop.java
index f6abf21..92291c1 100644
--- a/curator-client/src/main/java/org/apache/curator/RetryLoop.java
+++ b/curator-client/src/main/java/org/apache/curator/RetryLoop.java
@@ -74,7 +74,6 @@ public class RetryLoop
             unit.sleep(time);
         }
     };
-    private static final boolean checkInjectedDebugExceptions = Boolean.getBoolean(DebugUtils.PROPERTY_CHECK_INJECTED_DEBUG_EXCEPTIONS);
 
     /**
      * Returns the default retry sleeper
@@ -104,13 +103,10 @@ public class RetryLoop
         {
             try
             {
-                if ( checkInjectedDebugExceptions )
+                Exception debugException = client.getDebugException();
+                if ( debugException != null )
                 {
-                    Exception debugException = client.getDebugException();
-                    if ( debugException != null )
-                    {
-                        throw debugException;
-                    }
+                    throw debugException;
                 }
 
                 client.internalBlockUntilConnectedOrTimedOut();

http://git-wip-us.apache.org/repos/asf/curator/blob/6381ccb6/curator-client/src/main/java/org/apache/curator/utils/DebugUtils.java
----------------------------------------------------------------------
diff --git a/curator-client/src/main/java/org/apache/curator/utils/DebugUtils.java b/curator-client/src/main/java/org/apache/curator/utils/DebugUtils.java
index 0e473fb..3e90600 100644
--- a/curator-client/src/main/java/org/apache/curator/utils/DebugUtils.java
+++ b/curator-client/src/main/java/org/apache/curator/utils/DebugUtils.java
@@ -26,7 +26,6 @@ public class DebugUtils
     public static final String PROPERTY_LOG_ONLY_FIRST_CONNECTION_ISSUE_AS_ERROR_LEVEL =
"curator-log-only-first-connection-issue-as-error-level";
     public static final String PROPERTY_REMOVE_WATCHERS_IN_FOREGROUND = "curator-remove-watchers-in-foreground";
     public static final String PROPERTY_RETRY_FAILED_TESTS = "curator-retry-failed-tests";
-    public static final String PROPERTY_CHECK_INJECTED_DEBUG_EXCEPTIONS = "curator-check-injected-debug-exceptions";
 
     private DebugUtils()
     {

http://git-wip-us.apache.org/repos/asf/curator/blob/6381ccb6/curator-test/src/main/java/org/apache/curator/test/BaseClassForTests.java
----------------------------------------------------------------------
diff --git a/curator-test/src/main/java/org/apache/curator/test/BaseClassForTests.java b/curator-test/src/main/java/org/apache/curator/test/BaseClassForTests.java
index 55dcb61..c9f3524 100644
--- a/curator-test/src/main/java/org/apache/curator/test/BaseClassForTests.java
+++ b/curator-test/src/main/java/org/apache/curator/test/BaseClassForTests.java
@@ -44,20 +44,17 @@ public class BaseClassForTests
     private static final String INTERNAL_PROPERTY_DONT_LOG_CONNECTION_ISSUES;
     private static final String INTERNAL_PROPERTY_REMOVE_WATCHERS_IN_FOREGROUND;
     private static final String INTERNAL_RETRY_FAILED_TESTS;
-    private static final String INTERNAL_CHECK_INJECTED_DEBUG_EXCEPTIONS;
 
     static
     {
         String logConnectionIssues = null;
         String retryFailedTests = null;
-        String checkInjectedDebugExceptions = null;
         try
         {
             // use reflection to avoid adding a circular dependency in the pom
             Class<?> debugUtilsClazz = Class.forName("org.apache.curator.utils.DebugUtils");
             logConnectionIssues = (String)debugUtilsClazz.getField("PROPERTY_DONT_LOG_CONNECTION_ISSUES").get(null);
             retryFailedTests = (String)debugUtilsClazz.getField("PROPERTY_RETRY_FAILED_TESTS").get(null);
-            checkInjectedDebugExceptions = (String)debugUtilsClazz.getField("PROPERTY_CHECK_INJECTED_DEBUG_EXCEPTIONS").get(null);
         }
         catch ( Exception e )
         {
@@ -65,7 +62,6 @@ public class BaseClassForTests
         }
         INTERNAL_PROPERTY_DONT_LOG_CONNECTION_ISSUES = logConnectionIssues;
         INTERNAL_RETRY_FAILED_TESTS = retryFailedTests;
-        INTERNAL_CHECK_INJECTED_DEBUG_EXCEPTIONS = checkInjectedDebugExceptions;
         String s = null;
         try
         {
@@ -118,7 +114,6 @@ public class BaseClassForTests
             System.setProperty(INTERNAL_PROPERTY_DONT_LOG_CONNECTION_ISSUES, "true");
         }
         System.setProperty(INTERNAL_PROPERTY_REMOVE_WATCHERS_IN_FOREGROUND, "true");
-        System.setProperty(INTERNAL_CHECK_INJECTED_DEBUG_EXCEPTIONS, "true");
 
         while ( server == null )
         {


Mime
View raw message