@@ -1426,7 +1426,26 @@ public void test_insert_long() throws Exception {
14261426 assertEquals ("[0,0]" , bt .getColumn ("short" ).getString ());
14271427 conn .run ("undef(`t1,SHARED)" );
14281428 }
1429-
1429+ @ Test (timeout = 120000 )
1430+ public void test_insert_long_1 () throws Exception {
1431+ StringBuilder sb = new StringBuilder ();
1432+ sb .append ("t = streamTable(1000:0, `char`int`long`short`id," +
1433+ "[CHAR,INT,LONG,SHORT,INT]);" +
1434+ "share t as t1;" );
1435+ conn .run (sb .toString ());
1436+ mutithreadTableWriter_ = new MultithreadedTableWriter (HOST , PORT , "admin" , "123456" ,
1437+ "" , "t1" , false , false , null , 1 , 1 ,
1438+ 1 , "id" );
1439+ ErrorCodeInfo pErrorInfo = mutithreadTableWriter_ .insert ( (long )1 , (long )1 , (long )0 , (long )0 , (long )-1 );
1440+ pErrorInfo =mutithreadTableWriter_ .insert ( null , (long )1 , 9223372036854775807L , (long )0 , (long )1 );
1441+ pErrorInfo =mutithreadTableWriter_ .insert ( null , (long )1 , -9223372036854775807L , (long )0 , (long )1 );
1442+ assertEquals ("code= info=" ,pErrorInfo .toString ());
1443+ mutithreadTableWriter_ .waitForThreadCompletion ();
1444+ BasicTable bt = (BasicTable ) conn .run ("select * from t1;" );
1445+ assertEquals (3 , bt .rows ());
1446+ assertEquals ("[0,9223372036854775807,-9223372036854775807]" , bt .getColumn ("long" ).getString ());
1447+ conn .run ("undef(`t1,SHARED)" );
1448+ }
14301449
14311450 @ Test (timeout = 120000 )
14321451 public void test_insert_float () throws Exception {
0 commit comments