mirror of
https://github.com/QuasarApp/Heart.git
synced 2025-04-27 18:24:38 +00:00
fix tests
This commit is contained in:
parent
5640306618
commit
da2a604759
@ -64,25 +64,21 @@ void testSankeServer::testPakageData() {
|
||||
}
|
||||
|
||||
void testSankeServer::testAbstractNode() {
|
||||
ClientProtocol::AbstractNode node, node2, node3;
|
||||
ClientProtocol::AbstractNode node, node2;
|
||||
|
||||
const int port1 = TEST_PORT + 1;
|
||||
const int port2 = TEST_PORT + 2;
|
||||
const int port3 = TEST_PORT + 3;
|
||||
|
||||
QVERIFY(node.run(TEST_LOCAL_HOST, port1));
|
||||
QVERIFY(node2.run(TEST_LOCAL_HOST, port2));
|
||||
QVERIFY(node3.run(TEST_LOCAL_HOST, port3));
|
||||
|
||||
node.connectToHost(QHostAddress(TEST_LOCAL_HOST), port2);
|
||||
QVERIFY(node2.waitForNewConnection(1000));
|
||||
|
||||
QVERIFY(node.getWorkState().getConnectionCount() == 1);
|
||||
|
||||
node3.connectToHost(QHostAddress(TEST_LOCAL_HOST), port2);
|
||||
QVERIFY(node2.waitForNewConnection(1000));
|
||||
node2.stop();
|
||||
|
||||
QVERIFY(node.getWorkState().getConnectionCount() == 2);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user