You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2014/03/07 16:50:33 UTC

svn commit: r1575296 - /hbase/branches/0.98/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSimpleTotalOrderPartitioner.java

Author: tedyu
Date: Fri Mar  7 15:50:32 2014
New Revision: 1575296

URL: http://svn.apache.org/r1575296
Log:
HBASE-10697 Convert TestSimpleTotalOrderPartitioner to junit4 test


Modified:
    hbase/branches/0.98/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSimpleTotalOrderPartitioner.java

Modified: hbase/branches/0.98/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSimpleTotalOrderPartitioner.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSimpleTotalOrderPartitioner.java?rev=1575296&r1=1575295&r2=1575296&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSimpleTotalOrderPartitioner.java (original)
+++ hbase/branches/0.98/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSimpleTotalOrderPartitioner.java Fri Mar  7 15:50:32 2014
@@ -18,21 +18,31 @@
  */
 package org.apache.hadoop.hbase.mapreduce;
 
+import static org.junit.Assert.assertEquals;
+
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.*;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.junit.experimental.categories.Category;
 
+import org.junit.Test;
+
 /**
  * Test of simple partitioner.
  */
 @Category(SmallTests.class)
-public class TestSimpleTotalOrderPartitioner extends HBaseTestCase {
+public class TestSimpleTotalOrderPartitioner {
+  protected final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
+  Configuration conf = TEST_UTIL.getConfiguration();
+  
+  @Test
   public void testSplit() throws Exception {
     String start = "a";
     String end = "{";
     SimpleTotalOrderPartitioner<byte []> p =
       new SimpleTotalOrderPartitioner<byte []>();
+    
     this.conf.set(SimpleTotalOrderPartitioner.START, start);
     this.conf.set(SimpleTotalOrderPartitioner.END, end);
     p.setConf(this.conf);