chevaris commented on code in PR #1260:
URL: https://github.com/apache/curator/pull/1260#discussion_r2025096416
##########
curator-recipes/src/test/java/org/apache/curator/framework/recipes/nodes/TestPersistentTtlNode.java:
##########
@@ -187,4 +187,34 @@ public void childEvent(CuratorFramework client,
PathChildrenCacheEvent event) th
assertNull(client.checkExists().forPath("/test"));
}
}
+
+ @Test
+ public void testTouchNodeNotCreated() throws Exception {
+ try (CuratorFramework client =
+ CuratorFrameworkFactory.newClient(server.getConnectString(),
new RetryOneTime(1))) {
+ client.start();
+ final long ttlMs = 1_000L;
+ try (PersistentTtlNode node = new PersistentTtlNode(client,
"/test", ttlMs, new byte[0])) {
+ node.start();
+ assertTrue(node.waitForInitialCreate(timing.session(),
TimeUnit.MILLISECONDS));
+ // Give some minor time for touch node to be created. Will
worked after patch
+ for (int i = 1; i <= 5; i++) {
+ if (client.checkExists().forPath("/test") != null) {
+ break;
+ }
+ Thread.sleep(10L);
+ }
+ }
+ }
+ try (CuratorFramework client1 =
Review Comment:
Correct. Fixed in new implementation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]