Skip to content

Commit 7dca802

Browse files
committed
fix broken case
1 parent c49da16 commit 7dca802

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

test/com/xxdb/MultithreadedTableWriterTest.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import junit.framework.Assert;
1212
import org.junit.After;
1313
import org.junit.Before;
14+
import org.junit.BeforeClass;
1415
import org.junit.Test;
1516

1617
import java.io.ByteArrayOutputStream;
@@ -45,7 +46,13 @@ public class MultithreadedTableWriterTest implements Runnable {
4546

4647
public MultithreadedTableWriterTest() {
4748
}
48-
49+
@BeforeClass
50+
public static void prepare1 () throws IOException {
51+
DBConnection controller_conn = new DBConnection();
52+
controller_conn.connect(CONTROLLER_HOST, CONTROLLER_PORT, "admin", "123456");
53+
controller_conn.run("try{startDataNode('" + HOST + ":" + PORT + "')}catch(ex){}");
54+
controller_conn.run("sleep(5000)");
55+
}
4956
@Before
5057
public void prepare() throws IOException {
5158
conn = new DBConnection(false,false,true);

test/com/xxdb/SimpleDBConnectionPoolTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ public void test_SimpleDBConnectionPool_config_HighAvailability_true_LoadBalance
529529
DBConnection poolEntity = pool.getConnection();
530530
controller_conn.run("try{startDataNode('"+HOST+":"+PORT+"')}catch(ex){}");
531531
int port1 = port_list[1];
532-
poolEntity.run("sleep(2000)");
532+
//poolEntity.run("sleep(2000)");
533533
BasicTable re = (BasicTable) poolEntity.run("select port ,connectionNum from rpc(getControllerAlias(),getClusterPerf) where mode= 0");
534534
for (int i = 0; i < re.rows(); i++) {
535535
System.out.println("port:" + re.getColumn(0).get(i) + " connectionNum:" + re.getColumn(1).get(i));

test/com/xxdb/streaming/reverse/PollingClientReverseTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ public void test_subscribe_offset_reconnect() throws IOException {
527527
// }
528528

529529
}
530-
pollingClient1.unsubscribe(HOST, PORT, "Trades1");
530+
pollingClient.unsubscribe(HOST, PORT, "Trades1");
531531
// pollingClient.unsubscribe(HOST, PORT, "Trades1");
532532
}
533533
}

test/com/xxdb/streaming/reverse/ThreadedClientsubscribeReverseTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ public void test_subscribe_TableName_ActionName_Handler_reconnect() throws IOExc
500500
write_data.start();
501501
Thread.sleep(1000);
502502
conn.run("stopPublishTable('"+HOST+"',9055,'Trades',\"subTrades\")");
503-
Thread.sleep(1000);
503+
Thread.sleep(2000);
504504
//conn.run("stopPublishTable('"+HOST+"',9055,'Trades',\"subTrades\")");
505505
//Thread.sleep(3000);
506506
BasicInt row_num = (BasicInt)conn.run("(exec count(*) from Receive)[0]");

0 commit comments

Comments
 (0)