88import com .xxdb .io .LittleEndianDataOutputStream ;
99import com .xxdb .io .Long2 ;
1010import com .xxdb .io .ProgressListener ;
11+ import com .xxdb .route .AutoFitTableUpsert ;
1112import com .xxdb .streaming .client .Site ;
1213import org .junit .*;
1314import org .slf4j .Logger ;
@@ -2811,7 +2812,7 @@ public void test_DBConnection_not_login() throws IOException, InterruptedExcepti
28112812 }catch (Exception ex ){
28122813 re = ex .getMessage ();
28132814 }
2814- assertEquals (true ,re .contains ("getGroupList() => Only administrators execute function getGroupList " ));
2815+ assertEquals (true ,re .contains ("Login is required for script execution with client authentication enabled. " ));
28152816 }
28162817 @ Test
28172818 public void TestPartitionTable () throws IOException , InterruptedException {
@@ -3809,7 +3810,7 @@ public void test_tryRun_script() throws IOException{
38093810 @ Test
38103811 public void test_tryRun_priority_parallelism () throws IOException {
38113812 DBConnection conn = new DBConnection ();
3812- assertTrue (conn .connect (HOST ,PORT ,false ));
3813+ assertTrue (conn .connect (HOST ,PORT ,"admin" , "123456" , false ));
38133814 String scripts = "m=1..10$5:2;" ;
38143815 conn .tryRun (scripts ,1 ,1 );
38153816 BasicIntMatrix res = (BasicIntMatrix ) conn .run ("m;" );
@@ -3861,7 +3862,7 @@ public void test_TryRun_fetchSize() throws IOException, InterruptedException {
38613862 @ Test
38623863 public void test_run_priority () throws IOException {
38633864 DBConnection conn = new DBConnection (false ,false );
3864- conn .connect (HOST ,PORT );
3865+ conn .connect (HOST ,PORT , "admin" , "123456" );
38653866 conn .run ("t = table(1..5 as id, rand(100, 5) as price);" ,1 );
38663867 BasicTable res = (BasicTable ) conn .run ("select * from t;" ,2 );
38673868 assertEquals (5 ,res .rows ());
@@ -3870,7 +3871,7 @@ public void test_run_priority() throws IOException{
38703871 @ Test
38713872 public void test_run_clearSessionMemeory () throws IOException {
38723873 DBConnection conn = new DBConnection (false ,false );
3873- conn .connect (HOST ,PORT );
3874+ conn .connect (HOST ,PORT , "admin" , "123456" );
38743875 Boolean noError = true ;
38753876 conn .run ("testVar=1" ,false );
38763877 assertEquals ("1" ,conn .run ("testVar;" ,false ).getString ());
@@ -3887,7 +3888,7 @@ public void test_run_clearSessionMemeory() throws IOException{
38873888 @ Test
38883889 public void test_run_progressListener () throws IOException {
38893890 DBConnection conn = new DBConnection (false ,false );
3890- conn .connect (HOST ,PORT );
3891+ conn .connect (HOST ,PORT , "admin" , "123456" );
38913892 ProgressListener listener = new ProgressListener () {
38923893 @ Override
38933894 public void progress (String message ) {
@@ -3926,7 +3927,7 @@ public void test_tryUpload() throws IOException{
39263927@ Test
39273928public void test_SSL () throws Exception {
39283929 DBConnection conn = new DBConnection (false ,true );
3929- assertTrue (conn .connect (HOST ,PORT ));
3930+ assertTrue (conn .connect (HOST ,PORT , "admin" , "123456" ));
39303931 HashMap <String ,Entity > map = new HashMap <>();
39313932 map .put ("x" ,conn .run ("x=[1 3 6 10];" ));
39323933 map .put ("y" ,conn .run ("y=[2 1 5 3];" ));
@@ -4789,8 +4790,7 @@ public void test_BasicDBTask1223()throws Exception{
47894790 @ Test
47904791 public void Test_Connect_SqlStdEnum_DolphinDB () throws IOException , InterruptedException {
47914792 DBConnection conn = new DBConnection (DolphinDB );
4792- conn .connect (HOST ,PORT );
4793- sleep (500 );
4793+ conn .connect (HOST ,PORT ,"admin" ,"123456" );
47944794 assertEquals (true , conn .isConnected ());
47954795 BasicDoubleVector ba = (BasicDoubleVector )conn .run ("cumavg(1 2 3);" );
47964796 System .out .println (ba .getString ());
@@ -4807,8 +4807,7 @@ public void Test_Connect_SqlStdEnum_DolphinDB() throws IOException, InterruptedE
48074807 @ Test
48084808 public void Test_Connect_SqlStdEnum_DolphinDB_1 () throws IOException , InterruptedException {
48094809 DBConnection conn = new DBConnection ();
4810- conn .connect (HOST ,PORT );
4811- sleep (500 );
4810+ conn .connect (HOST ,PORT ,"admin" ,"123456" );
48124811 assertEquals (true , conn .isConnected ());
48134812 BasicDoubleVector ba = (BasicDoubleVector )conn .run ("runSQL(\" cumavg(1 2 3)\" , 'ddb')" );
48144813 System .out .println (ba .getString ());
@@ -4825,8 +4824,7 @@ public void Test_Connect_SqlStdEnum_DolphinDB_1() throws IOException, Interrupte
48254824 @ Test
48264825 public void Test_Connect_SqlStdEnum_DolphinDB_2 () throws IOException , InterruptedException {
48274826 DBConnection conn = new DBConnection (DolphinDB );
4828- conn .connect (HOST ,PORT );
4829- sleep (500 );
4827+ conn .connect (HOST ,PORT ,"admin" ,"123456" );
48304828 assertEquals (true , conn .isConnected ());
48314829 BasicDoubleVector ba = (BasicDoubleVector )conn .run ("runSQL(\" cumavg(1 2 3)\" , 'ddb')" );
48324830 System .out .println (ba .getString ());
@@ -4863,9 +4861,7 @@ public void Test_Connect_SqlStdEnum_DolphinDB_2() throws IOException, Interrupte
48634861 @ Test
48644862 public void Test_Connect_SqlStdEnum_Oracle () throws IOException , InterruptedException {
48654863 DBConnection conn = new DBConnection (Oracle );
4866- conn .connect (HOST ,PORT );
4867- conn .connect (HOST ,PORT );
4868- sleep (500 );
4864+ conn .connect (HOST ,PORT ,"admin" ,"123456" );
48694865 assertEquals (true , conn .isConnected ());
48704866 BasicDoubleVector ba = (BasicDoubleVector )conn .run ("cumavg(1 2 3);" );
48714867 System .out .println (ba .getString ());
@@ -4885,9 +4881,7 @@ public void Test_Connect_SqlStdEnum_Oracle() throws IOException, InterruptedExce
48854881 @ Test
48864882 public void Test_Connect_SqlStdEnum_Oracle_1 () throws IOException , InterruptedException {
48874883 DBConnection conn = new DBConnection ();
4888- conn .connect (HOST ,PORT );
4889- conn .connect (HOST ,PORT );
4890- sleep (500 );
4884+ conn .connect (HOST ,PORT ,"admin" ,"123456" );
48914885 assertEquals (true , conn .isConnected ());
48924886 BasicDoubleVector ba = (BasicDoubleVector )conn .run ("runSQL(\" cumavg(1 2 3)\" , 'oracle');" );
48934887 System .out .println (ba .getString ());
@@ -4907,9 +4901,7 @@ public void Test_Connect_SqlStdEnum_Oracle_1() throws IOException, InterruptedEx
49074901 @ Test
49084902 public void Test_Connect_SqlStdEnum_Oracle_2 () throws IOException , InterruptedException {
49094903 DBConnection conn = new DBConnection (Oracle );
4910- conn .connect (HOST ,PORT );
4911- conn .connect (HOST ,PORT );
4912- sleep (500 );
4904+ conn .connect (HOST ,PORT ,"admin" ,"123456" );
49134905 assertEquals (true , conn .isConnected ());
49144906 BasicDoubleVector ba = (BasicDoubleVector )conn .run ("runSQL(\" cumavg(1 2 3)\" , 'ddb');" );
49154907 System .out .println (ba .getString ());
@@ -4929,8 +4921,7 @@ public void Test_Connect_SqlStdEnum_Oracle_2() throws IOException, InterruptedEx
49294921 @ Test
49304922 public void Test_Connect_SqlStdEnum_MySQL () throws IOException , InterruptedException {
49314923 DBConnection conn = new DBConnection (MySQL );
4932- conn .connect (HOST ,PORT );
4933- sleep (500 );
4924+ conn .connect (HOST ,PORT ,"admin" ,"123456" );
49344925 assertEquals (true , conn .isConnected ());
49354926 BasicDoubleVector ba = (BasicDoubleVector )conn .run ("cumavg(1 2 3);" );
49364927 System .out .println (ba .getString ());
@@ -4955,8 +4946,7 @@ public void Test_Connect_SqlStdEnum_MySQL() throws IOException, InterruptedExcep
49554946 @ Test
49564947 public void Test_Connect_SqlStdEnum_MySQL_1 () throws IOException , InterruptedException {
49574948 DBConnection conn = new DBConnection ();
4958- conn .connect (HOST ,PORT );
4959- sleep (500 );
4949+ conn .connect (HOST ,PORT ,"admin" ,"123456" );
49604950 assertEquals (true , conn .isConnected ());
49614951 BasicDoubleVector ba = (BasicDoubleVector )conn .run ("runSQL(\" cumavg(1 2 3)\" , 'mysql');" );
49624952 System .out .println (ba .getString ());
@@ -4981,9 +4971,7 @@ public void Test_Connect_SqlStdEnum_MySQL_1() throws IOException, InterruptedExc
49814971 @ Test
49824972 public void Test_Connect_SqlStdEnum_MySQL_2 () throws IOException , InterruptedException {
49834973 DBConnection conn = new DBConnection (MySQL );
4984- conn .connect (HOST ,PORT );
4985- conn .connect (HOST ,PORT );
4986- sleep (500 );
4974+ conn .connect (HOST ,PORT ,"admin" ,"123456" );
49874975 assertEquals (true , conn .isConnected ());
49884976 BasicDoubleVector ba = (BasicDoubleVector )conn .run ("runSQL(\" cumavg(1 2 3)\" , 'ddb');" );
49894977 System .out .println (ba .getString ());
@@ -5013,9 +5001,7 @@ public void Test_Connect_SqlStdEnum_not_match() throws IOException, InterruptedE
50135001 @ Test
50145002 public void Test_Connect_SqlStdEnum_getByName () throws IOException , InterruptedException {
50155003 DBConnection conn = new DBConnection ( getByName ("MySQL" ));
5016- conn .connect (HOST ,PORT );
5017- conn .connect (HOST ,PORT );
5018- sleep (500 );
5004+ conn .connect (HOST ,PORT ,"admin" ,"123456" );
50195005 assertEquals (true , conn .isConnected ());
50205006 BasicDoubleVector ba = (BasicDoubleVector )conn .run ("runSQL(\" cumavg(1 2 3)\" , 'ddb');" );
50215007 System .out .println (ba .getString ());
0 commit comments