You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ra...@apache.org on 2020/04/19 21:31:06 UTC

[curator] branch master updated: CURATOR-567 - TestCleanState.closeAndTestClean has meet is desired goal. Start removing it where it causes test flakiness

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

randgalt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/curator.git


The following commit(s) were added to refs/heads/master by this push:
     new 1c56fc6  CURATOR-567 - TestCleanState.closeAndTestClean has meet is desired goal. Start removing it where it causes test flakiness
     new 1d0c6f2  Merge branch 'CURATOR-567-remove-test-clean-state-where-flaky'
1c56fc6 is described below

commit 1c56fc622c837dd98ed2b41f121309e6cd34e6fc
Author: randgalt <ra...@apache.org>
AuthorDate: Sun Apr 19 16:30:42 2020 -0500

    CURATOR-567 - TestCleanState.closeAndTestClean has meet is desired goal. Start removing it where it causes test flakiness
---
 .../framework/recipes/shared/TestSharedCount.java        | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/shared/TestSharedCount.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/shared/TestSharedCount.java
index 822a01c..2992eb9 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/shared/TestSharedCount.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/shared/TestSharedCount.java
@@ -23,7 +23,6 @@ import com.google.common.collect.Lists;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
-import org.apache.curator.framework.imps.TestCleanState;
 import org.apache.curator.framework.api.BackgroundCallback;
 import org.apache.curator.framework.api.CuratorEvent;
 import org.apache.curator.framework.api.CuratorWatcher;
@@ -31,7 +30,6 @@ import org.apache.curator.framework.state.ConnectionState;
 import org.apache.curator.framework.state.ConnectionStateListener;
 import org.apache.curator.retry.RetryNTimes;
 import org.apache.curator.retry.RetryOneTime;
-import org.apache.curator.test.BaseClassForTests;
 import org.apache.curator.test.Timing;
 import org.apache.curator.test.compatibility.CuratorTestBase;
 import org.apache.curator.utils.CloseableUtils;
@@ -159,7 +157,7 @@ public class TestSharedCount extends CuratorTestBase
             }
             for ( CuratorFramework client : clients )
             {
-                TestCleanState.closeAndTestClean(client);
+                CloseableUtils.closeQuietly(client);
             }
         }
     }
@@ -204,7 +202,7 @@ public class TestSharedCount extends CuratorTestBase
         finally
         {
             CloseableUtils.closeQuietly(count);
-            TestCleanState.closeAndTestClean(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -249,7 +247,7 @@ public class TestSharedCount extends CuratorTestBase
         finally
         {
             CloseableUtils.closeQuietly(count);
-            TestCleanState.closeAndTestClean(client);
+            CloseableUtils.closeQuietly(client);
         }
     }
 
@@ -304,8 +302,8 @@ public class TestSharedCount extends CuratorTestBase
         {
             CloseableUtils.closeQuietly(count2);
             CloseableUtils.closeQuietly(count1);
-            TestCleanState.closeAndTestClean(client2);
-            TestCleanState.closeAndTestClean(client1);
+            CloseableUtils.closeQuietly(client2);
+            CloseableUtils.closeQuietly(client1);
         }
     }
 
@@ -367,7 +365,7 @@ public class TestSharedCount extends CuratorTestBase
         finally
         {
             CloseableUtils.closeQuietly(sharedCount);
-            TestCleanState.closeAndTestClean(curatorFramework);
+            CloseableUtils.closeQuietly(curatorFramework);
         }
     }
 
@@ -436,7 +434,7 @@ public class TestSharedCount extends CuratorTestBase
         finally
         {
             CloseableUtils.closeQuietly(sharedCount);
-            TestCleanState.closeAndTestClean(curatorFramework);
+            CloseableUtils.closeQuietly(curatorFramework);
         }
     }