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 [email protected] or file a JIRA ticket
with INFRA.
---