@@ -164,6 +164,21 @@ def teardown
164164 assert_nil ( res )
165165 end
166166
167+ define_test "delete should set proper cell type" do
168+ del = @test_table . _createdelete_internal ( '104' , 'x:a' , 1212 )
169+ assert_equal ( del . get ( 'x' . to_java_bytes , 'a' . to_java_bytes ) . get ( 0 ) . getType . getCode ,
170+ org . apache . hadoop . hbase ::KeyValue ::Type ::DeleteColumn . getCode )
171+ del = @test_table . _createdelete_internal ( '104' , 'x:a' , 1212 , [ ] , false )
172+ assert_equal ( del . get ( 'x' . to_java_bytes , 'a' . to_java_bytes ) . get ( 0 ) . getType . getCode ,
173+ org . apache . hadoop . hbase ::KeyValue ::Type ::Delete . getCode )
174+ del = @test_table . _createdelete_internal ( '104' , 'x' , 1212 )
175+ assert_equal ( del . get ( 'x' . to_java_bytes , nil ) . get ( 0 ) . getType . getCode ,
176+ org . apache . hadoop . hbase ::KeyValue ::Type ::DeleteFamily . getCode )
177+ del = @test_table . _createdelete_internal ( '104' , 'x' , 1212 , [ ] , false )
178+ assert_equal ( del . get ( 'x' . to_java_bytes , nil ) . get ( 0 ) . getType . getCode ,
179+ org . apache . hadoop . hbase ::KeyValue ::Type ::DeleteFamilyVersion . getCode )
180+ end
181+
167182 #-------------------------------------------------------------------------------
168183
169184 define_test "deleteall should work w/o columns and timestamps" do
0 commit comments