zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] eolivelli commented on a change in pull request #1091: ZOOKEEPER-3546: Delete empty containers with cversion == 0 after a grace period
Date Tue, 17 Sep 2019 11:31:34 GMT
eolivelli commented on a change in pull request #1091: ZOOKEEPER-3546: Delete empty containers
with cversion == 0 after a grace period
URL: https://github.com/apache/zookeeper/pull/1091#discussion_r325116122
 
 

 ##########
 File path: zookeeper-server/src/test/java/org/apache/zookeeper/server/CreateContainerTest.java
 ##########
 @@ -237,6 +237,22 @@ public Void call() throws Exception {
         assertEquals(queue.poll(5, TimeUnit.SECONDS), "/four");
     }
 
+    @Test(timeout = 30000)
+    public void testContainerWithNoChildGracePeriod() throws KeeperException, InterruptedException
{
+        zk.create("/foo", new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.CONTAINER);
+
+        ContainerManager containerManager = new ContainerManager(serverFactory.getZooKeeperServer().getZKDatabase(),
serverFactory.getZooKeeperServer().firstProcessor, 1, 100);
+        containerManager.checkContainers();
+        Thread.sleep(1000);
+
+        assertNotNull("Container should still be there", zk.exists("/foo", false));
+
+        containerManager.checkContainers();
 
 Review comment:
   Can we avoid this sleep?
   This test may turn into a flaky one

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message