You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2011/10/12 20:37:32 UTC

svn commit: r1182516 - in /hbase/trunk: CHANGES.txt src/test/ruby/hbase/admin_test.rb src/test/ruby/tests_runner.rb

Author: stack
Date: Wed Oct 12 18:37:32 2011
New Revision: 1182516

URL: http://svn.apache.org/viewvc?rev=1182516&view=rev
Log:
HBASE-4555 TestShell seems passed, but actually errors seen in test output file

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/test/ruby/hbase/admin_test.rb
    hbase/trunk/src/test/ruby/tests_runner.rb

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1182516&r1=1182515&r2=1182516&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Wed Oct 12 18:37:32 2011
@@ -346,8 +346,12 @@ Release 0.92.0 - Unreleased
    HBASE-4402  Retaining locality after restart broken
    HBASE-4482  Race Condition Concerning Eviction in SlabCache (Li Pi)
    HBASE-4547  TestAdmin failing in 0.92 because .tableinfo not found
-   HBASE-4540  OpenedRegionHandler is not enforcing atomicity of the operation it is performing(Ram)
-   HBASE-4335  Splits can create temporary holes in .META. that confuse clients and regionservers (Lars H)
+   HBASE-4540  OpenedRegionHandler is not enforcing atomicity of the operation
+               it is performing(Ram)
+   HBASE-4335  Splits can create temporary holes in .META. that confuse clients
+               and regionservers (Lars H)
+   HBASE-4555  TestShell seems passed, but actually errors seen in test output
+               file (Mingjie Lai)
 
   TESTS
    HBASE-4450  test for number of blocks read: to serve as baseline for expected

Modified: hbase/trunk/src/test/ruby/hbase/admin_test.rb
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/ruby/hbase/admin_test.rb?rev=1182516&r1=1182515&r2=1182516&view=diff
==============================================================================
--- hbase/trunk/src/test/ruby/hbase/admin_test.rb (original)
+++ hbase/trunk/src/test/ruby/hbase/admin_test.rb Wed Oct 12 18:37:32 2011
@@ -96,7 +96,7 @@ module Hbase
     #-------------------------------------------------------------------------------
 
     define_test "split should work" do
-      admin.split('.META.')
+      admin.split('.META.', nil)
     end
 
     #-------------------------------------------------------------------------------
@@ -217,66 +217,57 @@ module Hbase
 
     define_test "alter should fail with non-string table names" do
       assert_raise(ArgumentError) do
-        admin.alter(123, METHOD => 'delete', NAME => 'y')
+        admin.alter(123, true, METHOD => 'delete', NAME => 'y')
       end
     end
 
     define_test "alter should fail with non-existing tables" do
       assert_raise(ArgumentError) do
-        admin.alter('.NOT.EXISTS.', METHOD => 'delete', NAME => 'y')
+        admin.alter('.NOT.EXISTS.', true, METHOD => 'delete', NAME => 'y')
       end
     end
 
-    define_test "alter should fail with enabled tables" do
-      assert_raise(ArgumentError) do
-        admin.alter(@test_name, METHOD => 'delete', NAME => 'y')
-      end
+    define_test "alter should not fail with enabled tables" do
+      admin.enable(@test_name)
+      admin.alter(@test_name, true, METHOD => 'delete', NAME => 'y')
     end
 
     define_test "alter should be able to delete column families" do
       assert_equal(['x:', 'y:'], table(@test_name).get_all_columns.sort)
-      admin.disable(@test_name)
-      admin.alter(@test_name, METHOD => 'delete', NAME => 'y')
+      admin.alter(@test_name, true, METHOD => 'delete', NAME => 'y')
       admin.enable(@test_name)
       assert_equal(['x:'], table(@test_name).get_all_columns.sort)
     end
 
     define_test "alter should be able to add column families" do
       assert_equal(['x:', 'y:'], table(@test_name).get_all_columns.sort)
-      admin.disable(@test_name)
-      admin.alter(@test_name, NAME => 'z')
+      admin.alter(@test_name, true, NAME => 'z')
       admin.enable(@test_name)
       assert_equal(['x:', 'y:', 'z:'], table(@test_name).get_all_columns.sort)
     end
 
     define_test "alter should be able to add column families (name-only alter spec)" do
       assert_equal(['x:', 'y:'], table(@test_name).get_all_columns.sort)
-      admin.disable(@test_name)
-      admin.alter(@test_name, 'z')
+      admin.alter(@test_name, true, 'z')
       admin.enable(@test_name)
       assert_equal(['x:', 'y:', 'z:'], table(@test_name).get_all_columns.sort)
     end
 
     define_test "alter should support more than one alteration in one call" do
       assert_equal(['x:', 'y:'], table(@test_name).get_all_columns.sort)
-      admin.disable(@test_name)
-      admin.alter(@test_name, { NAME => 'z' }, { METHOD => 'delete', NAME => 'y' })
+      admin.alter(@test_name, true, { NAME => 'z' }, { METHOD => 'delete', NAME => 'y' })
       admin.enable(@test_name)
       assert_equal(['x:', 'z:'], table(@test_name).get_all_columns.sort)
     end
 
     define_test 'alter should support shortcut DELETE alter specs' do
       assert_equal(['x:', 'y:'], table(@test_name).get_all_columns.sort)
-      admin.disable(@test_name)
-      admin.alter(@test_name, 'delete' => 'y')
-      admin.disable(@test_name)
+      admin.alter(@test_name, true, 'delete' => 'y')
       assert_equal(['x:'], table(@test_name).get_all_columns.sort)
     end
 
     define_test "alter should be able to change table options" do
-      admin.disable(@test_name)
-      admin.alter(@test_name, METHOD => 'table_att', 'MAX_FILESIZE' => 12345678)
-      admin.disable(@test_name)
+      admin.alter(@test_name, true, METHOD => 'table_att', 'MAX_FILESIZE' => 12345678)
       assert_match(/12345678/, admin.describe(@test_name))
     end
   end

Modified: hbase/trunk/src/test/ruby/tests_runner.rb
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/ruby/tests_runner.rb?rev=1182516&r1=1182515&r2=1182516&view=diff
==============================================================================
--- hbase/trunk/src/test/ruby/tests_runner.rb (original)
+++ hbase/trunk/src/test/ruby/tests_runner.rb Wed Oct 12 18:37:32 2011
@@ -55,7 +55,9 @@ files.each do |file|
   end
 end
 
-Test::Unit::AutoRunner.run
+if !Test::Unit::AutoRunner.run
+  raise "Shell unit tests failed. Check output file for details."
+end
 
 puts "Done with tests! Shutting down the cluster..."
 if @own_cluster