curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brienwheeler-sqrrl <...@git.apache.org>
Subject [GitHub] curator pull request: CURATOR-140: Allow InterProcessReadWriteLock...
Date Mon, 03 Nov 2014 20:57:18 GMT
Github user brienwheeler-sqrrl commented on a diff in the pull request:

    https://github.com/apache/curator/pull/48#discussion_r19763277
  
    --- Diff: curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessReadWriteLock.java
---
    @@ -261,6 +261,39 @@ public Void call() throws Exception
             Assert.assertTrue(maxConcurrentCount.get() > 1);
         }
     
    +    @Test
    +    public void     testSetNodeData() throws Exception
    +    {
    +        CuratorFramework        client = CuratorFrameworkFactory.newClient(server.getConnectString(),
new RetryOneTime(1));
    +
    +        try
    +        {
    +            client.start();
    +
    +            final byte[] nodeData = new byte[] { 1, 2, 3, 4 };
    +
    +            InterProcessReadWriteLock   lock = new InterProcessReadWriteLock(client,
"/lock", nodeData);
    +
    +            // mutate passed-in node data, lock has made copy
    +            nodeData[0] = 5;
    --- End diff --
    
    Yep, that's why I put in the post-creation mutation of the passed-in node data array.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message