Repository: zookeeper Updated Branches: refs/heads/branch-3.5 bc7d58651 -> f10879167
ZOOKEEPER-2620: Add comments to testReadOnlySnapshotDir and testReadOnlyTxnLogDir indicating that the tests will fail when run as root Author: Abraham Fine <[email protected]> Reviewers: Michael Han <[email protected]> Closes #142 from afine/ZOOKEEPER-2620 (cherry picked from commit b7873a59433b252c54c6c926cda711a6abf55374) Signed-off-by: Michael Han <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/zookeeper/repo Commit: http://git-wip-us.apache.org/repos/asf/zookeeper/commit/f1087916 Tree: http://git-wip-us.apache.org/repos/asf/zookeeper/tree/f1087916 Diff: http://git-wip-us.apache.org/repos/asf/zookeeper/diff/f1087916 Branch: refs/heads/branch-3.5 Commit: f10879167331b94662caf642ae2f52db798a75ff Parents: bc7d586 Author: Abraham Fine <[email protected]> Authored: Thu Jan 5 13:32:53 2017 -0800 Committer: Michael Han <[email protected]> Committed: Thu Jan 5 13:33:10 2017 -0800 ---------------------------------------------------------------------- .../zookeeper/server/ZooKeeperServerMainTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zookeeper/blob/f1087916/src/java/test/org/apache/zookeeper/server/ZooKeeperServerMainTest.java ---------------------------------------------------------------------- diff --git a/src/java/test/org/apache/zookeeper/server/ZooKeeperServerMainTest.java b/src/java/test/org/apache/zookeeper/server/ZooKeeperServerMainTest.java index 1030209..01b6560 100644 --- a/src/java/test/org/apache/zookeeper/server/ZooKeeperServerMainTest.java +++ b/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();
