curator-dev mailing list archives

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

    https://github.com/apache/curator/pull/48#discussion_r19763101
  
    --- 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 --
    
    What's this for?


---
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