@@ -2189,7 +2189,7 @@ public void testMatrixUpload() throws IOException {
21892189 assertTrue (((BasicDateTimeMatrix ) matrixDateTimeRes ).get (1 , 1 ).getString ().equals ("1925.10.18T23:32:09" ));
21902190
21912191 Entity matrixTimeCross = conn .run ("time(cross(add,13:31:10.008 12:30:10.008,1 2 3 -4))" );
2192- Entity matrixTime = conn .run ("take(1900 .06.13T13:30:10,8)$4:2" );
2192+ Entity matrixTime = conn .run ("take(2000 .06.13T13:30:10,8)$4:2" );
21932193 map .put ("matrixTimeCross" , matrixTimeCross );
21942194 map .put ("matrixTime" , matrixTime );
21952195 conn .upload (map );
@@ -5097,7 +5097,7 @@ public void test_exception_script() throws IOException {
50975097 }catch (Exception e ){
50985098 re = e .getMessage ();
50995099 }
5100- assertEquals (true , re .contains ("Duplicated column name name. " ));
5100+ assertEquals (true , re .contains ("Duplicated column name name " ));
51015101 }
51025102
51035103 @ Test
@@ -5112,7 +5112,7 @@ public void test_exception_Function() throws IOException {
51125112 }catch (Exception e ){
51135113 re = e .getMessage ();
51145114 }
5115- assertEquals (true , re .contains ("Can't recognize function name C. function: C" ));
5115+ assertEquals (true , re .contains ("Can't recognize function name C function: C" ));
51165116 }
51175117 @ Test
51185118 public void test_allDateType_combine () throws IOException {
@@ -5148,7 +5148,7 @@ public void test_allDateType_array_combine() throws IOException {
51485148 assertEquals (10000 , data .rows ());
51495149 }
51505150
5151- @ Test //api设置的parallelism小于server的setMaxJobParallelism
5151+ @ Test //api设置的parallelism小于server的setMaxJobParallelism server默认管理员MaxJobParallelism为64,普通用户2
51525152 public void test_DBConnection_run_parallelism_1 () throws IOException {
51535153 PrepareUser ("parallelism_test" ,"123456" );
51545154 conn = new DBConnection ();
@@ -5158,7 +5158,7 @@ public void test_DBConnection_run_parallelism_1() throws IOException {
51585158 DBConnection conn1 = new DBConnection ();
51595159 conn1 .connect (HOST ,PORT ,"parallelism_test" ,"123456" );
51605160 BasicTable re1 = (BasicTable )conn .run ("getConsoleJobs();" ,3 ,5 ,false );
5161- Assert .assertEquals ("5 " ,re1 .getColumn (6 ).get (0 ).getString ());
5161+ Assert .assertEquals ("2 " ,re1 .getColumn (6 ).get (0 ).getString ());
51625162 System .out .println (re1 .getColumn (5 ).get (0 ).getString ());
51635163 }
51645164 @ Test //api设置的parallelism大于server的setMaxJobParallelism
@@ -5189,10 +5189,10 @@ public void test_DBConnection_run_parallelism_3() throws IOException, Interrupte
51895189 System .out .println (re1 .getString ());
51905190 Assert .assertEquals ("22" ,re1 .getColumn (6 ).get (0 ).getString ());
51915191 }
5192- @ Test //isClientAuth开启
5192+ // @Test //isClientAuth开启
51935193 public void test_not_login_run_fuction () throws Exception {
51945194 DBConnection db = new DBConnection ();
5195- db .connect ("192.168.0.69" , 8868 );
5195+ db .connect (HOST , PORT );
51965196 Entity version = db .run ("version" ,new ArrayList <>());
51975197 System .out .println (version .getString ());
51985198 assertNotNull (version .getString ());
@@ -5263,7 +5263,7 @@ public void test_not_login_run_fuction_authenticateByTicket() throws Exception {
52635263 @ Test
52645264 public void test_not_login_run_fuction_login () throws Exception {
52655265 DBConnection db = new DBConnection ();
5266- db .connect ("192.168.0.69" , 8868 );
5266+ db .connect (HOST , PORT );
52675267 List <Entity > entity1 = new ArrayList <>();
52685268 entity1 .add (new BasicString ("admin" ));
52695269 entity1 .add (new BasicString ("123456" ));
@@ -5273,14 +5273,14 @@ public void test_not_login_run_fuction_login() throws Exception {
52735273 @ Test
52745274 public void test_not_login_run_fuction_not_support () throws Exception {
52755275 DBConnection db = new DBConnection ();
5276- db .connect ("192.168.0.69" , 8868 );
5276+ db .connect (HOST , PORT );
52775277 String re = null ;
52785278 try {
52795279 db .run ("getAllDBs" ,new ArrayList <>());
52805280 }catch (Exception e ){
52815281 re = e .getMessage ();
52825282 }
5283- assertEquals (true , re .contains ("Login is required for script execution with client authentication enabled. RefId: S04009. function: getAllDBs" ));
5283+ assertEquals (true , re .contains ("Login is required for script execution with client authentication enabled. RefId: S04009 function: getAllDBs" ));
52845284 }
52855285 //@Test //isClientAuth开启
52865286 public void test_Connect_enableHighAvailability_true () throws IOException {
@@ -5419,7 +5419,14 @@ public void Test_DBConnection_enableSCRAM_true_compress_true() throws Exception
54195419 System .out .println (re .getString ());
54205420 assertEquals ("2" , re .getString ());
54215421 }
5422-
5422+ //@Test
5423+ public void Test_DBConnection_usePython_true () throws Exception {
5424+ DBConnection conn = new DBConnection (false , false ,false ,true );
5425+ conn .connect (HOST ,PORT ,"admin" ,"123456" );
5426+ BasicInt re = (BasicInt ) conn .run ("1+1" );
5427+ System .out .println (re .getString ());
5428+ assertEquals ("2" , re .getString ());
5429+ }
54235430 @ Test
54245431 public void Test_DBConnection_enableSCRAM_true_usePython_true () throws Exception {
54255432 PrepareUser_authMode ("test1" ,"123456" ,"scram" );
@@ -5745,7 +5752,7 @@ public void Test_DBConnection_ConnectConfig_initialScript() throws Exception {
57455752 }
57465753
57475754 @ Test
5748- public void Test_DBConnection_ConnectConfig_reconnect_true_tryReconnectNums_10 () throws Exception {
5755+ public void Test_DBConnection_ConnectConfig_reconnect_true_tryReconnectNums_5 () throws Exception {
57495756 DBConnection conn = new DBConnection ();
57505757 String re = null ;
57515758 try {
0 commit comments