8
8
import com .xxdb .io .LittleEndianDataOutputStream ;
9
9
import com .xxdb .io .Long2 ;
10
10
import com .xxdb .io .ProgressListener ;
11
+ import com .xxdb .route .AutoFitTableUpsert ;
11
12
import com .xxdb .streaming .client .Site ;
12
13
import org .junit .*;
13
14
import org .slf4j .Logger ;
@@ -2811,7 +2812,7 @@ public void test_DBConnection_not_login() throws IOException, InterruptedExcepti
2811
2812
}catch (Exception ex ){
2812
2813
re = ex .getMessage ();
2813
2814
}
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. " ));
2815
2816
}
2816
2817
@ Test
2817
2818
public void TestPartitionTable () throws IOException , InterruptedException {
@@ -3809,7 +3810,7 @@ public void test_tryRun_script() throws IOException{
3809
3810
@ Test
3810
3811
public void test_tryRun_priority_parallelism () throws IOException {
3811
3812
DBConnection conn = new DBConnection ();
3812
- assertTrue (conn .connect (HOST ,PORT ,false ));
3813
+ assertTrue (conn .connect (HOST ,PORT ,"admin" , "123456" , false ));
3813
3814
String scripts = "m=1..10$5:2;" ;
3814
3815
conn .tryRun (scripts ,1 ,1 );
3815
3816
BasicIntMatrix res = (BasicIntMatrix ) conn .run ("m;" );
@@ -3861,7 +3862,7 @@ public void test_TryRun_fetchSize() throws IOException, InterruptedException {
3861
3862
@ Test
3862
3863
public void test_run_priority () throws IOException {
3863
3864
DBConnection conn = new DBConnection (false ,false );
3864
- conn .connect (HOST ,PORT );
3865
+ conn .connect (HOST ,PORT , "admin" , "123456" );
3865
3866
conn .run ("t = table(1..5 as id, rand(100, 5) as price);" ,1 );
3866
3867
BasicTable res = (BasicTable ) conn .run ("select * from t;" ,2 );
3867
3868
assertEquals (5 ,res .rows ());
@@ -3870,7 +3871,7 @@ public void test_run_priority() throws IOException{
3870
3871
@ Test
3871
3872
public void test_run_clearSessionMemeory () throws IOException {
3872
3873
DBConnection conn = new DBConnection (false ,false );
3873
- conn .connect (HOST ,PORT );
3874
+ conn .connect (HOST ,PORT , "admin" , "123456" );
3874
3875
Boolean noError = true ;
3875
3876
conn .run ("testVar=1" ,false );
3876
3877
assertEquals ("1" ,conn .run ("testVar;" ,false ).getString ());
@@ -3887,7 +3888,7 @@ public void test_run_clearSessionMemeory() throws IOException{
3887
3888
@ Test
3888
3889
public void test_run_progressListener () throws IOException {
3889
3890
DBConnection conn = new DBConnection (false ,false );
3890
- conn .connect (HOST ,PORT );
3891
+ conn .connect (HOST ,PORT , "admin" , "123456" );
3891
3892
ProgressListener listener = new ProgressListener () {
3892
3893
@ Override
3893
3894
public void progress (String message ) {
@@ -3926,7 +3927,7 @@ public void test_tryUpload() throws IOException{
3926
3927
@ Test
3927
3928
public void test_SSL () throws Exception {
3928
3929
DBConnection conn = new DBConnection (false ,true );
3929
- assertTrue (conn .connect (HOST ,PORT ));
3930
+ assertTrue (conn .connect (HOST ,PORT , "admin" , "123456" ));
3930
3931
HashMap <String ,Entity > map = new HashMap <>();
3931
3932
map .put ("x" ,conn .run ("x=[1 3 6 10];" ));
3932
3933
map .put ("y" ,conn .run ("y=[2 1 5 3];" ));
@@ -4789,8 +4790,7 @@ public void test_BasicDBTask1223()throws Exception{
4789
4790
@ Test
4790
4791
public void Test_Connect_SqlStdEnum_DolphinDB () throws IOException , InterruptedException {
4791
4792
DBConnection conn = new DBConnection (DolphinDB );
4792
- conn .connect (HOST ,PORT );
4793
- sleep (500 );
4793
+ conn .connect (HOST ,PORT ,"admin" ,"123456" );
4794
4794
assertEquals (true , conn .isConnected ());
4795
4795
BasicDoubleVector ba = (BasicDoubleVector )conn .run ("cumavg(1 2 3);" );
4796
4796
System .out .println (ba .getString ());
@@ -4807,8 +4807,7 @@ public void Test_Connect_SqlStdEnum_DolphinDB() throws IOException, InterruptedE
4807
4807
@ Test
4808
4808
public void Test_Connect_SqlStdEnum_DolphinDB_1 () throws IOException , InterruptedException {
4809
4809
DBConnection conn = new DBConnection ();
4810
- conn .connect (HOST ,PORT );
4811
- sleep (500 );
4810
+ conn .connect (HOST ,PORT ,"admin" ,"123456" );
4812
4811
assertEquals (true , conn .isConnected ());
4813
4812
BasicDoubleVector ba = (BasicDoubleVector )conn .run ("runSQL(\" cumavg(1 2 3)\" , 'ddb')" );
4814
4813
System .out .println (ba .getString ());
@@ -4825,8 +4824,7 @@ public void Test_Connect_SqlStdEnum_DolphinDB_1() throws IOException, Interrupte
4825
4824
@ Test
4826
4825
public void Test_Connect_SqlStdEnum_DolphinDB_2 () throws IOException , InterruptedException {
4827
4826
DBConnection conn = new DBConnection (DolphinDB );
4828
- conn .connect (HOST ,PORT );
4829
- sleep (500 );
4827
+ conn .connect (HOST ,PORT ,"admin" ,"123456" );
4830
4828
assertEquals (true , conn .isConnected ());
4831
4829
BasicDoubleVector ba = (BasicDoubleVector )conn .run ("runSQL(\" cumavg(1 2 3)\" , 'ddb')" );
4832
4830
System .out .println (ba .getString ());
@@ -4863,9 +4861,7 @@ public void Test_Connect_SqlStdEnum_DolphinDB_2() throws IOException, Interrupte
4863
4861
@ Test
4864
4862
public void Test_Connect_SqlStdEnum_Oracle () throws IOException , InterruptedException {
4865
4863
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" );
4869
4865
assertEquals (true , conn .isConnected ());
4870
4866
BasicDoubleVector ba = (BasicDoubleVector )conn .run ("cumavg(1 2 3);" );
4871
4867
System .out .println (ba .getString ());
@@ -4885,9 +4881,7 @@ public void Test_Connect_SqlStdEnum_Oracle() throws IOException, InterruptedExce
4885
4881
@ Test
4886
4882
public void Test_Connect_SqlStdEnum_Oracle_1 () throws IOException , InterruptedException {
4887
4883
DBConnection conn = new DBConnection ();
4888
- conn .connect (HOST ,PORT );
4889
- conn .connect (HOST ,PORT );
4890
- sleep (500 );
4884
+ conn .connect (HOST ,PORT ,"admin" ,"123456" );
4891
4885
assertEquals (true , conn .isConnected ());
4892
4886
BasicDoubleVector ba = (BasicDoubleVector )conn .run ("runSQL(\" cumavg(1 2 3)\" , 'oracle');" );
4893
4887
System .out .println (ba .getString ());
@@ -4907,9 +4901,7 @@ public void Test_Connect_SqlStdEnum_Oracle_1() throws IOException, InterruptedEx
4907
4901
@ Test
4908
4902
public void Test_Connect_SqlStdEnum_Oracle_2 () throws IOException , InterruptedException {
4909
4903
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" );
4913
4905
assertEquals (true , conn .isConnected ());
4914
4906
BasicDoubleVector ba = (BasicDoubleVector )conn .run ("runSQL(\" cumavg(1 2 3)\" , 'ddb');" );
4915
4907
System .out .println (ba .getString ());
@@ -4929,8 +4921,7 @@ public void Test_Connect_SqlStdEnum_Oracle_2() throws IOException, InterruptedEx
4929
4921
@ Test
4930
4922
public void Test_Connect_SqlStdEnum_MySQL () throws IOException , InterruptedException {
4931
4923
DBConnection conn = new DBConnection (MySQL );
4932
- conn .connect (HOST ,PORT );
4933
- sleep (500 );
4924
+ conn .connect (HOST ,PORT ,"admin" ,"123456" );
4934
4925
assertEquals (true , conn .isConnected ());
4935
4926
BasicDoubleVector ba = (BasicDoubleVector )conn .run ("cumavg(1 2 3);" );
4936
4927
System .out .println (ba .getString ());
@@ -4955,8 +4946,7 @@ public void Test_Connect_SqlStdEnum_MySQL() throws IOException, InterruptedExcep
4955
4946
@ Test
4956
4947
public void Test_Connect_SqlStdEnum_MySQL_1 () throws IOException , InterruptedException {
4957
4948
DBConnection conn = new DBConnection ();
4958
- conn .connect (HOST ,PORT );
4959
- sleep (500 );
4949
+ conn .connect (HOST ,PORT ,"admin" ,"123456" );
4960
4950
assertEquals (true , conn .isConnected ());
4961
4951
BasicDoubleVector ba = (BasicDoubleVector )conn .run ("runSQL(\" cumavg(1 2 3)\" , 'mysql');" );
4962
4952
System .out .println (ba .getString ());
@@ -4981,9 +4971,7 @@ public void Test_Connect_SqlStdEnum_MySQL_1() throws IOException, InterruptedExc
4981
4971
@ Test
4982
4972
public void Test_Connect_SqlStdEnum_MySQL_2 () throws IOException , InterruptedException {
4983
4973
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" );
4987
4975
assertEquals (true , conn .isConnected ());
4988
4976
BasicDoubleVector ba = (BasicDoubleVector )conn .run ("runSQL(\" cumavg(1 2 3)\" , 'ddb');" );
4989
4977
System .out .println (ba .getString ());
@@ -5013,9 +5001,7 @@ public void Test_Connect_SqlStdEnum_not_match() throws IOException, InterruptedE
5013
5001
@ Test
5014
5002
public void Test_Connect_SqlStdEnum_getByName () throws IOException , InterruptedException {
5015
5003
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" );
5019
5005
assertEquals (true , conn .isConnected ());
5020
5006
BasicDoubleVector ba = (BasicDoubleVector )conn .run ("runSQL(\" cumavg(1 2 3)\" , 'ddb');" );
5021
5007
System .out .println (ba .getString ());
0 commit comments