File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -633,18 +633,15 @@ public void Test_BasicTable_addColumn_col_null() throws Exception {
633
633
}
634
634
@ Test
635
635
public void Test_BasicTable_addColumn_dataLength_not_match () throws Exception {
636
- DBConnection conn = new DBConnection (false , false , false );
637
- conn .connect (HOST , PORT , "admin" , "123456" );
638
- BasicTable bt = (BasicTable ) conn .run ("t = table(1 2 3 as int1);select * from t" );
639
- System .out .println (bt .getString ());
636
+ BasicTable bt = createBasicTable ();
640
637
BasicBooleanVector bbv = new BasicBooleanVector (1 );
641
- bbv . setNull ( 0 ) ;
642
- bbv . add (( byte ) 1 );
643
- // bbv.add((byte) 0 );
644
- System . out . println ( bbv . getString ());
645
- bt . addColumn ( "col1" , bbv );
646
- System . out . println ( bt . getString ());
647
- assertEquals ("[,true,]" , bt . getColumn ( 1 ). getString () );
638
+ String re = null ;
639
+ try {
640
+ bt . addColumn ( "col1" , bbv );
641
+ } catch ( Exception e ){
642
+ re = e . getMessage ( );
643
+ }
644
+ assertEquals ("The length of column col1 must be the same as the first column length: 2." , re );
648
645
}
649
646
@ Test
650
647
public void Test_BasicTable_addColumn_BOOL () throws Exception {
You can’t perform that action at this time.
0 commit comments