zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject zookeeper git commit: ZOOKEEPER-3094: Make BufferSizeTest reliable
Date Fri, 27 Jul 2018 03:28:41 GMT
Repository: zookeeper
Updated Branches:
  refs/heads/master 9f8279841 -> 7b7c65877


ZOOKEEPER-3094: Make BufferSizeTest reliable

ZKPatch: d8b825d6533e9848565beff09e9a018136ca32bd (extract)

Changes made to the testStartupFailure test to remember the old directory and switch back
to it after the test has completed.

Author: Jeelani Mohamed Abdul Khader <mjeelani@devvm3360.prn2.facebook.com>

Reviewers: Michael Han <hanm@apache.org>, Norbert Kalmar

Closes #577 from mjeelanimsft/make-buffersizetest-reliable


Project: http://git-wip-us.apache.org/repos/asf/zookeeper/repo
Commit: http://git-wip-us.apache.org/repos/asf/zookeeper/commit/7b7c6587
Tree: http://git-wip-us.apache.org/repos/asf/zookeeper/tree/7b7c6587
Diff: http://git-wip-us.apache.org/repos/asf/zookeeper/diff/7b7c6587

Branch: refs/heads/master
Commit: 7b7c6587733dba3c9f3862a034b354d067e0dc47
Parents: 9f82798
Author: Jeelani Mohamed Abdul Khader <mjeelani@devvm3360.prn2.facebook.com>
Authored: Thu Jul 26 20:28:37 2018 -0700
Committer: Michael Han <hanm@apache.org>
Committed: Thu Jul 26 20:28:37 2018 -0700

----------------------------------------------------------------------
 src/java/test/org/apache/zookeeper/test/BufferSizeTest.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zookeeper/blob/7b7c6587/src/java/test/org/apache/zookeeper/test/BufferSizeTest.java
----------------------------------------------------------------------
diff --git a/src/java/test/org/apache/zookeeper/test/BufferSizeTest.java b/src/java/test/org/apache/zookeeper/test/BufferSizeTest.java
index 6d74e54..f164298 100644
--- a/src/java/test/org/apache/zookeeper/test/BufferSizeTest.java
+++ b/src/java/test/org/apache/zookeeper/test/BufferSizeTest.java
@@ -121,12 +121,15 @@ public class BufferSizeTest extends ClientBase {
     private void testStartupFailure(File testDir, String failureMsg) throws Exception {
         stopServer();
         // Point server at testDir
+        File oldTmpDir = tmpDir;
         tmpDir = testDir;
         try {
             startServer();
             fail(failureMsg);
         } catch (IOException e) {
             LOG.info("Successfully caught IOException: " + e);
+        } finally {
+            tmpDir = oldTmpDir;
         }
     }
 }


Mime
View raw message