hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r885166 - /hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestFromClientSide.java
Date Sat, 28 Nov 2009 23:30:01 GMT
Author: apurtell
Date: Sat Nov 28 23:30:01 2009
New Revision: 885166

URL: http://svn.apache.org/viewvc?rev=885166&view=rev
Log:
HBASE-1995 Add configurable max value size check; updated test

Modified:
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestFromClientSide.java

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestFromClientSide.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestFromClientSide.java?rev=885166&r1=885165&r2=885166&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestFromClientSide.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestFromClientSide.java Sat
Nov 28 23:30:01 2009
@@ -22,6 +22,7 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -411,10 +412,12 @@
     ht.put(put);
     try {
       conf.setInt("hbase.client.keyvalue.maxsize", 2 * 1024 * 1024);
+      TABLE = Bytes.toBytes("testMaxKeyValueSize2");
+      ht = TEST_UTIL.createTable(TABLE, FAMILY);
       put = new Put(ROW);
-      put.add(FAMILY, QUALIFIER, VALUE);
+      put.add(FAMILY, QUALIFIER, value);
       ht.put(put);
-      throw new IOException("Inserting a too large KeyValue worked, should throw exception");
+      fail("Inserting a too large KeyValue worked, should throw exception");
     } catch(Exception e) {}
     conf.set("hbase.client.keyvalue.maxsize", oldMaxSize);
   }
@@ -876,13 +879,13 @@
     // Null table name (should NOT work)
     try {
       TEST_UTIL.createTable(null, FAMILY);
-      throw new IOException("Creating a table with null name passed, should have failed");
+      fail("Creating a table with null name passed, should have failed");
     } catch(Exception e) {}
 
     // Null family (should NOT work)
     try {
       TEST_UTIL.createTable(TABLE, (byte[])null);
-      throw new IOException("Creating a table with a null family passed, should fail");
+      fail("Creating a table with a null family passed, should fail");
     } catch(Exception e) {}
     
     HTable ht = TEST_UTIL.createTable(TABLE, FAMILY);
@@ -892,7 +895,7 @@
       Put put = new Put((byte[])null);
       put.add(FAMILY, QUALIFIER, VALUE);
       ht.put(put);
-      throw new IOException("Inserting a null row worked, should throw exception");
+      fail("Inserting a null row worked, should throw exception");
     } catch(Exception e) {}
     
     // Null qualifier (should work)



Mime
View raw message