add a way to run in blocking more, which is useful for server mode to have N*thread instead of 2N*thread for N connections
This commit is contained in:
@ -250,6 +250,8 @@ TEST_CASE("Websocket chat", "[websocket_chat]")
|
||||
ix::msleep(10);
|
||||
}
|
||||
|
||||
REQUIRE(server.getClients().size() == 2);
|
||||
|
||||
// Add a bit of extra time, for the subscription to be active
|
||||
ix::msleep(200);
|
||||
|
||||
@ -269,6 +271,10 @@ TEST_CASE("Websocket chat", "[websocket_chat]")
|
||||
REQUIRE(chatA.getReceivedMessagesCount() == 2);
|
||||
REQUIRE(chatB.getReceivedMessagesCount() == 3);
|
||||
|
||||
// Give us 500ms for the server to notice that clients went away
|
||||
ix::msleep(500);
|
||||
REQUIRE(server.getClients().size() == 0);
|
||||
|
||||
ix::reportWebSocketTraffic();
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,6 @@
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
cmake .. || exit 1
|
||||
make || exit 1
|
||||
./ixwebsocket_unittest
|
||||
|
Reference in New Issue
Block a user