hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject svn commit: r1554879 - in /hbase/branches/0.94: ./ src/test/java/org/apache/hadoop/hbase/ src/test/java/org/apache/hadoop/hbase/client/ src/test/java/org/apache/hadoop/hbase/master/
Date Thu, 02 Jan 2014 19:02:13 GMT
Author: larsh
Date: Thu Jan  2 19:02:12 2014
New Revision: 1554879

URL: http://svn.apache.org/r1554879
Log:
HBASE-10259 [0.94] Upgrade JUnit to 4.11

Modified:
    hbase/branches/0.94/pom.xml
    hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java
    hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java
    hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java
    hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManager.java
    hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java

Modified: hbase/branches/0.94/pom.xml
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/pom.xml?rev=1554879&r1=1554878&r2=1554879&view=diff
==============================================================================
--- hbase/branches/0.94/pom.xml (original)
+++ hbase/branches/0.94/pom.xml Thu Jan  2 19:02:12 2014
@@ -1030,7 +1030,7 @@
     <jetty.jspapi.version>6.1.14</jetty.jspapi.version>
     <jersey.version>1.8</jersey.version>
     <jruby.version>1.6.5</jruby.version>
-    <junit.version>4.10-HBASE-1</junit.version>
+    <junit.version>4.11</junit.version>
     <slf4j.version>1.4.3</slf4j.version>
     <log4j.version>1.2.16</log4j.version>
     <mockito-all.version>1.8.5</mockito-all.version>

Modified: hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java?rev=1554879&r1=1554878&r2=1554879&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java (original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java Thu Jan 
2 19:02:12 2014
@@ -367,8 +367,13 @@ public class TestZooKeeper {
         }
       }
     }
-    zk.close();
     ZKUtil.createAndFailSilent(zk2, aclZnode);
+
+    // reset /'s ACL for tests that follow
+    zk = new ZooKeeper(quorumServers, sessionTimeout, EmptyWatcher.instance);
+    zk.addAuthInfo("digest", "hbase:rox".getBytes());
+    zk.setACL("/", ZooDefs.Ids.OPEN_ACL_UNSAFE, -1);
+    zk.close();
  }
   
   /**

Modified: hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java?rev=1554879&r1=1554878&r2=1554879&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java (original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java Thu Jan
 2 19:02:12 2014
@@ -27,8 +27,6 @@ import static org.junit.Assert.fail;
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -380,8 +378,6 @@ public class TestAdmin {
   @Test
   public void testOnlineChangeTableSchema() throws IOException, InterruptedException {
     final byte [] tableName = Bytes.toBytes("changeTableSchemaOnline");
-    TEST_UTIL.getMiniHBaseCluster().getMaster().getConfiguration().setBoolean(
-        "hbase.online.schema.update.enable", true);
     HTableDescriptor [] tables = admin.listTables();
     int numTables = tables.length;
     TEST_UTIL.createTable(tableName, HConstants.CATALOG_FAMILY).close();
@@ -500,6 +496,8 @@ public class TestAdmin {
       expectedException = true;
     }
     assertTrue("Online schema update should not happen.", expectedException);
+    TEST_UTIL.getMiniHBaseCluster().getMaster().getConfiguration().setBoolean(
+        "hbase.online.schema.update.enable", true);
   }
 
   /**

Modified: hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java?rev=1554879&r1=1554878&r2=1554879&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java
(original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java
Thu Jan  2 19:02:12 2014
@@ -34,11 +34,14 @@ import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.FixMethodOrder;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runners.MethodSorters;
 
 import static org.junit.Assert.*;
 
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
 @Category(MediumTests.class)
 public class TestMultiParallel {
   private static final Log LOG = LogFactory.getLog(TestMultiParallel.class);
@@ -290,7 +293,9 @@ public class TestMultiParallel {
   }
 
   @Test (timeout=300000)
-  public void testBatchWithPut() throws Exception {
+  // FIXME: sort test lexicographically to the end.
+  // otherwise clashed with testFlushCommitsWithAbort
+  public void testZBatchWithPut() throws Exception {
     LOG.info("test=testBatchWithPut");
     HTable table = new HTable(UTIL.getConfiguration(), TEST_TABLE);
 

Modified: hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManager.java?rev=1554879&r1=1554878&r2=1554879&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManager.java
(original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManager.java
Thu Jan  2 19:02:12 2014
@@ -71,8 +71,10 @@ import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.FixMethodOrder;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runners.MethodSorters;
 import org.mockito.Mockito;
 import org.mockito.internal.util.reflection.Whitebox;
 
@@ -82,6 +84,7 @@ import com.google.protobuf.ServiceExcept
 /**
  * Test {@link AssignmentManager}
  */
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
 @Category(MediumTests.class)
 public class TestAssignmentManager {
   private static final HBaseTestingUtility HTU = new HBaseTestingUtility();

Modified: hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java?rev=1554879&r1=1554878&r2=1554879&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
(original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
Thu Jan  2 19:02:12 2014
@@ -27,7 +27,6 @@ import java.util.UUID;
 import java.util.concurrent.atomic.AtomicLong;
 
 import junit.framework.Assert;
-
 import static org.junit.Assert.*;
 
 import org.apache.commons.logging.Log;
@@ -50,10 +49,13 @@ import org.apache.zookeeper.KeeperExcept
 import org.apache.zookeeper.ZooDefs.Ids;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.FixMethodOrder;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runners.MethodSorters;
 import org.mockito.Mockito;
 
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
 @Category(MediumTests.class)
 public class TestSplitLogManager {
   private static final Log LOG = LogFactory.getLog(TestSplitLogManager.class);



Mime
View raw message