Github user cammckenzie commented on a diff in the pull request:
https://github.com/apache/curator/pull/171#discussion_r111854064
--- Diff:
curator-recipes/src/test/java/org/apache/curator/framework/recipes/nodes/TestPersistentTtlNode.java
---
@@ -0,0 +1,58 @@
+package org.apache.curator.framework.recipes.nodes;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.curator.retry.RetryOneTime;
+import org.apache.curator.test.BaseClassForTests;
+import org.apache.curator.test.Timing;
+import org.testng.Assert;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import java.util.concurrent.TimeUnit;
+
+public class TestPersistentTtlNode extends BaseClassForTests
+{
+ private final Timing timing = new Timing();
+
+ @BeforeMethod
+ @Override
+ public void setup() throws Exception
+ {
+ System.setProperty("znode.container.checkIntervalMs", "1");
+ super.setup();
+ }
+
+ @AfterMethod
+ @Override
+ public void teardown() throws Exception
+ {
+ System.clearProperty("znode.container.checkIntervalMs");
+ super.teardown();
+ }
+
+ @Test
+ public void testBasic() throws Exception
+ {
+ try (CuratorFramework client =
CuratorFrameworkFactory.newClient(server.getConnectString(), new
RetryOneTime(1)))
+ {
+ client.start();
+
+ try (PersistentTtlNode node = new PersistentTtlNode(client,
"/test", 10, new byte[0]))
+ {
+ node.start();
+ node.waitForInitialCreate(timing.session(),
TimeUnit.MILLISECONDS);
--- End diff --
This should probably assert that the return is true?
---
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.
---