You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by "tisonkun (via GitHub)" <gi...@apache.org> on 2023/03/17 07:36:11 UTC

[GitHub] [curator] tisonkun commented on a diff in pull request #445: CURATOR-621: Fix write acquire after downgrade InterProcessReadWriteLock

tisonkun commented on code in PR #445:
URL: https://github.com/apache/curator/pull/445#discussion_r1139877343


##########
curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessReadWriteLock.java:
##########
@@ -239,6 +241,50 @@ public void testDowngrading() throws Exception
         }
     }
 
+    @Test
+    public void testContendingDowngrading() throws Exception
+    {
+        CuratorFramework client1 = CuratorFrameworkFactory.newClient(server.getConnectString(), new RetryOneTime(1));
+        CuratorFramework client2 = CuratorFrameworkFactory.newClient(server.getConnectString(), new RetryOneTime(1));

Review Comment:
   nit: this test doesn't need two clients. You can refactor to use single client:
   
   ```java
           CuratorFramework client = CuratorFrameworkFactory.newClient(server.getConnectString(), new RetryOneTime(1));
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@curator.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org