[ 
https://issues.apache.org/jira/browse/CURATOR-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15971941#comment-15971941
 ] 

ASF GitHub Bot commented on CURATOR-351:
----------------------------------------

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?


> ZOOKEEPER-2169 will add support TTL Nodes
> -----------------------------------------
>
>                 Key: CURATOR-351
>                 URL: https://issues.apache.org/jira/browse/CURATOR-351
>             Project: Apache Curator
>          Issue Type: New Feature
>            Reporter: Jordan Zimmerman
>            Assignee: Jordan Zimmerman
>             Fix For: TBD
>
>
> ZOOKEEPER-2169 will add support TTL Nodes. Upgrade the Curator DSL to support 
> TTLs.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to