Просмотр исходного кода

ZOOKEEPER-2620: Add comments to testReadOnlySnapshotDir and testReadOnlyTxnLogDir indicating that the tests will fail when run as root

Author: Abraham Fine <afine@apache.org>

Reviewers: Michael Han <hanm@apache.org>

Closes #142 from afine/ZOOKEEPER-2620

(cherry picked from commit b7873a59433b252c54c6c926cda711a6abf55374)
Signed-off-by: Michael Han <hanm@apache.org>
Abraham Fine 8 лет назад
Родитель
Сommit
0753f4cdce

+ 12 - 0
src/java/test/org/apache/zookeeper/server/ZooKeeperServerMainTest.java

@@ -202,6 +202,12 @@ public class ZooKeeperServerMainTest extends ZKTestCase implements Watcher {
         main.deleteDirs();
     }
 
+    /**
+     * Tests that the ZooKeeper server will fail to start if the
+     * snapshot directory is read only.
+     *
+     * This test will fail if it is executed as root user.
+     */
     @Test(timeout = 30000)
     public void testReadOnlySnapshotDir() throws Exception {
         ClientBase.setupTestEnv();
@@ -236,6 +242,12 @@ public class ZooKeeperServerMainTest extends ZKTestCase implements Watcher {
         main.deleteDirs();
     }
 
+    /**
+     * Tests that the ZooKeeper server will fail to start if the
+     * transaction log directory is read only.
+     *
+     * This test will fail if it is executed as root user.
+     */
     @Test(timeout = 30000)
     public void testReadOnlyTxnLogDir() throws Exception {
         ClientBase.setupTestEnv();