@@ -255,6 +255,7 @@ public void Test_getConnection_enableHighAvailability_true_conn_high_load() thro
255
255
conn .connect (HOST , PORT , "admin" , "123456" , "" , true ,ipports );
256
256
list1 .add (conn );
257
257
}
258
+ connection1 .run ("sleep(3000)" );
258
259
BasicTable re1 = (BasicTable )connection1 .run ("select port ,connectionNum from rpc(getControllerAlias(),getClusterPerf) where mode= 0" );
259
260
for (int i = 0 ; i < re1 .rows (); i ++) {
260
261
System .out .println ("port:" + re1 .getColumn (0 ).get (i )+" connectionNum:" +re1 .getColumn (1 ).get (i ));
@@ -296,6 +297,7 @@ public void Test_getConnection_enableHighAvailability_true_all_note_conn_high_lo
296
297
conn .connect (HOST , PORT , "admin" , "123456" , "" , true ,ipports );
297
298
list1 .add (conn );
298
299
}
300
+ connection1 .run ("sleep(3000)" );
299
301
BasicTable re2 = (BasicTable )connection1 .run ("select port ,connectionNum from rpc(getControllerAlias(),getClusterPerf) where mode= 0" );
300
302
for (int i = 0 ; i < re2 .rows (); i ++) {
301
303
System .out .println ("port:" + re2 .getColumn (0 ).get (i )+" connectionNum:" +re2 .getColumn (1 ).get (i ));
@@ -314,6 +316,7 @@ public void Test_getConnection_enableHighAvailability_false_1() throws SQLExcept
314
316
}
315
317
DBConnection connection1 = new DBConnection ();
316
318
connection1 .connect (HOST , controller_port , "admin" , "123456" ,true );
319
+ connection1 .run ("sleep(3000)" );
317
320
BasicTable re = (BasicTable )connection1 .run ("select port ,connectionNum from rpc(getControllerAlias(),getClusterPerf) where mode= 0" );
318
321
for (int i = 0 ; i < re .rows (); i ++) {
319
322
System .out .println ("port:" + re .getColumn (0 ).get (i )+" connectionNum:" +re .getColumn (1 ).get (i ));
@@ -336,6 +339,7 @@ public void Test_getConnection_enableHighAvailability_true_site_null_all_note_lo
336
339
}
337
340
DBConnection connection1 = new DBConnection ();
338
341
connection1 .connect (HOST , PORT , "admin" , "123456" ,true );
342
+ connection1 .run ("sleep(3000)" );
339
343
BasicTable re = (BasicTable )connection1 .run ("select port ,connectionNum from rpc(getControllerAlias(),getClusterPerf) where mode= 0" );
340
344
for (int i = 0 ; i < re .rows (); i ++) {
341
345
System .out .println ("port:" + re .getColumn (0 ).get (i )+" connectionNum:" +re .getColumn (1 ).get (i ));
@@ -357,6 +361,7 @@ public void Test_getConnection_enableHighAvailability_true_site_not_null_all_not
357
361
}
358
362
DBConnection connection1 = new DBConnection ();
359
363
connection1 .connect (HOST , PORT , "admin" , "123456" , true );
364
+ connection1 .run ("sleep(3000)" );
360
365
BasicTable re = (BasicTable ) connection1 .run ("select port ,connectionNum from rpc(getControllerAlias(),getClusterPerf) where mode= 0" );
361
366
for (int i = 0 ; i < re .rows (); i ++) {
362
367
System .out .println ("port:" + re .getColumn (0 ).get (i ) + " connectionNum:" + re .getColumn (1 ).get (i ));
@@ -376,7 +381,7 @@ public void Test_getConnection_enableHighAvailability_false_enableLoadBalance_fa
376
381
}
377
382
DBConnection connection1 = new DBConnection ();
378
383
connection1 .connect (HOST , PORT , "admin" , "123456" ,false );
379
- connection1 .run ("sleep(1000 )" );
384
+ connection1 .run ("sleep(3000 )" );
380
385
BasicIntVector re = (BasicIntVector )connection1 .run ("EXEC connectionNum from rpc(getControllerAlias(),getClusterPerf) where port=" +PORT );
381
386
System .out .println (re .getInt (0 ));
382
387
assertEquals (true ,re .getInt (0 )>100 );
@@ -391,6 +396,7 @@ public void Test_getConnection_enableHighAvailability_false_enableLoadBalance_nu
391
396
}
392
397
DBConnection connection1 = new DBConnection ();
393
398
connection1 .connect (HOST , PORT , "admin" , "123456" ,false );
399
+ connection1 .run ("sleep(3000)" );
394
400
BasicIntVector re = (BasicIntVector )connection1 .run ("EXEC connectionNum from rpc(getControllerAlias(),getClusterPerf) where port=" +PORT );
395
401
System .out .println (re .getInt (0 ));
396
402
assertEquals (true ,re .getInt (0 )>100 );
@@ -405,6 +411,7 @@ public void Test_getConnection_enableHighAvailability_true_enableLoadBalance_fal
405
411
}
406
412
DBConnection connection1 = new DBConnection ();
407
413
connection1 .connect (HOST , PORT , "admin" , "123456" ,false );
414
+ connection1 .run ("sleep(3000)" );
408
415
BasicIntVector re = (BasicIntVector )connection1 .run ("EXEC connectionNum from rpc(getControllerAlias(),getClusterPerf) where port=" +PORT );
409
416
System .out .println (re .getInt (0 ));
410
417
assertEquals (true ,re .getInt (0 )>100 );
@@ -422,7 +429,7 @@ public void Test_getConnection_enableHighAvailability_true_enableLoadBalance_fal
422
429
list .add (connection );
423
430
}
424
431
controller_conn .run ("try{startDataNode('" +HOST +":" +PORT +"')}catch(ex){}" );
425
- controller_conn .run ("sleep(2000 );" );
432
+ controller_conn .run ("sleep(3000 );" );
426
433
DBConnection connection1 = new DBConnection ();
427
434
connection1 .connect (HOST , PORT , "admin" , "123456" ,false );
428
435
int port1 = port_list [1 ];
@@ -446,6 +453,7 @@ public void Test_getConnection_enableHighAvailability_true_enableLoadBalance_tru
446
453
}
447
454
DBConnection connection1 = new DBConnection ();
448
455
connection1 .connect (HOST , PORT , "admin" , "123456" ,true );
456
+ connection1 .run ("sleep(3000)" );
449
457
BasicTable re = (BasicTable ) connection1 .run ("select port ,connectionNum from rpc(getControllerAlias(),getClusterPerf) where mode= 0" );
450
458
for (int i = 0 ; i < re .rows (); i ++) {
451
459
System .out .println ("port:" + re .getColumn (0 ).get (i ) + " connectionNum:" + re .getColumn (1 ).get (i ));
@@ -469,6 +477,7 @@ public void Test_getConnection_enableHighAvailability_true_enableLoadBalance_tru
469
477
controller_conn .run ("try{startDataNode('" +HOST +":" +PORT +"')}catch(ex){}" );
470
478
DBConnection connection1 = new DBConnection ();
471
479
connection1 .connect (HOST , PORT , "admin" , "123456" ,false );
480
+ connection1 .run ("sleep(3000)" );
472
481
BasicTable re = (BasicTable ) connection1 .run ("select port ,connectionNum from rpc(getControllerAlias(),getClusterPerf) where mode= 0" );
473
482
for (int i = 0 ; i < re .rows (); i ++) {
474
483
System .out .println ("port:" + re .getColumn (0 ).get (i ) + " connectionNum:" + re .getColumn (1 ).get (i ));
0 commit comments