zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mic...@apache.org
Subject svn commit: r1567488 - in /zookeeper/trunk: CHANGES.txt src/java/test/org/apache/zookeeper/test/ReconfigTest.java
Date Wed, 12 Feb 2014 01:30:48 GMT
Author: michim
Date: Wed Feb 12 01:30:48 2014
New Revision: 1567488

URL: http://svn.apache.org/r1567488
Log:
ZOOKEEPER-1874 Add proper teardown/cleanups in ReconfigTest to shutdown quorumpeer (Rakesh
R and Germán Blanco via michim)

Modified:
    zookeeper/trunk/CHANGES.txt
    zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ReconfigTest.java

Modified: zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/trunk/CHANGES.txt?rev=1567488&r1=1567487&r2=1567488&view=diff
==============================================================================
--- zookeeper/trunk/CHANGES.txt (original)
+++ zookeeper/trunk/CHANGES.txt Wed Feb 12 01:30:48 2014
@@ -547,6 +547,9 @@ BUGFIXES:
   ZOOKEEPER-1811. The ZooKeeperSaslClient service name principal is
   hardcoded to "zookeeper" (Harsh J via phunt)
 
+  ZOOKEEPER-1874 Add proper teardown/cleanups in ReconfigTest to shutdown
+  quorumpeer (Rakesh R and Germán Blanco via michim)
+
 IMPROVEMENTS:
 
   ZOOKEEPER-1170. Fix compiler (eclipse) warnings: unused imports,

Modified: zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ReconfigTest.java
URL: http://svn.apache.org/viewvc/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ReconfigTest.java?rev=1567488&r1=1567487&r2=1567488&view=diff
==============================================================================
--- zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ReconfigTest.java (original)
+++ zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ReconfigTest.java Wed Feb 12 01:30:48
2014
@@ -39,6 +39,7 @@ import org.apache.zookeeper.server.quoru
 import org.apache.zookeeper.server.quorum.flexible.QuorumMaj;
 import org.apache.zookeeper.server.quorum.flexible.QuorumVerifier;
 import org.junit.Assert;
+import org.junit.After;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -47,6 +48,15 @@ public class ReconfigTest extends ZKTest
     private static final Logger LOG = LoggerFactory
             .getLogger(ReconfigTest.class);
 
+    private QuorumUtil qu;
+
+    @After
+    public void tearDown() throws Exception {
+        if (qu != null) {
+            qu.tearDown();
+        }
+    }
+
     public static String reconfig(ZooKeeper zk, List<String> joiningServers,
             List<String> leavingServers, List<String> newMembers, long fromConfig)
             throws KeeperException, InterruptedException {
@@ -180,7 +190,7 @@ public class ReconfigTest extends ZKTest
  
     @Test
     public void testRemoveAddOne() throws Exception {
-        QuorumUtil qu = new QuorumUtil(1); // create 3 servers
+        qu = new QuorumUtil(1); // create 3 servers
         qu.disableJMXTest = true;
         qu.startAll();
         ZooKeeper[] zkArr = createHandles(qu);
@@ -257,7 +267,7 @@ public class ReconfigTest extends ZKTest
      */
     @Test
     public void testRemoveAddTwo() throws Exception {
-        QuorumUtil qu = new QuorumUtil(2); // create 5 servers
+        qu = new QuorumUtil(2); // create 5 servers
         qu.disableJMXTest = true;
         qu.startAll();
         ZooKeeper[] zkArr = createHandles(qu);
@@ -356,7 +366,7 @@ public class ReconfigTest extends ZKTest
 
     @Test
     public void testBulkReconfig() throws Exception {
-        QuorumUtil qu = new QuorumUtil(3); // create 7 servers
+        qu = new QuorumUtil(3); // create 7 servers
         qu.disableJMXTest = true;
         qu.startAll();
         ZooKeeper[] zkArr = createHandles(qu);
@@ -394,7 +404,7 @@ public class ReconfigTest extends ZKTest
 
     @Test
     public void testRemoveOneAsynchronous() throws Exception {
-        QuorumUtil qu = new QuorumUtil(2); 
+        qu = new QuorumUtil(2); 
         qu.disableJMXTest = true;
         qu.startAll();
         ZooKeeper[] zkArr = createHandles(qu);
@@ -434,7 +444,7 @@ public class ReconfigTest extends ZKTest
     
     @Test
     public void testRoleChange() throws Exception {
-        QuorumUtil qu = new QuorumUtil(1); // create 3 servers
+        qu = new QuorumUtil(1); // create 3 servers
         qu.disableJMXTest = true;
         qu.startAll();
         ZooKeeper[] zkArr = createHandles(qu);
@@ -508,7 +518,7 @@ public class ReconfigTest extends ZKTest
 
     @Test
     public void testPortChange() throws Exception {
-        QuorumUtil qu = new QuorumUtil(1); // create 3 servers
+        qu = new QuorumUtil(1); // create 3 servers
         qu.disableJMXTest = true;
         qu.startAll();
         ZooKeeper[] zkArr = createHandles(qu);
@@ -623,7 +633,7 @@ public class ReconfigTest extends ZKTest
     
     @Test
     public void testQuorumSystemChange() throws Exception {
-        QuorumUtil qu = new QuorumUtil(3); // create 7 servers
+        qu = new QuorumUtil(3); // create 7 servers
         qu.disableJMXTest = true;
         qu.startAll();
         ZooKeeper[] zkArr = createHandles(qu);
@@ -699,7 +709,7 @@ public class ReconfigTest extends ZKTest
     
     @Test
     public void testInitialConfigHasPositiveVersion() throws Exception {
-        QuorumUtil qu = new QuorumUtil(1); // create 3 servers
+        qu = new QuorumUtil(1); // create 3 servers
         qu.disableJMXTest = true;
         qu.startAll();
         ZooKeeper[] zkArr = createHandles(qu);



Mime
View raw message