test/httpwstest.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
New commits: commit 73cdebc60c7668d4b44d232feca398f1e4f2f837 Author: Ashod Nakashian <[email protected]> Date: Tue Jan 3 23:27:35 2017 -0500 wsd: fixup alert all users unittest Change-Id: I8d9c7581ed2ae42e180301c38a8775cb8dcb396a Reviewed-on: https://gerrit.libreoffice.org/32716 Reviewed-by: Ashod Nakashian <[email protected]> Tested-by: Ashod Nakashian <[email protected]> diff --git a/test/httpwstest.cpp b/test/httpwstest.cpp index 1d078e4..4f1a8d7 100644 --- a/test/httpwstest.cpp +++ b/test/httpwstest.cpp @@ -2195,6 +2195,7 @@ void HTTPWSTest::testAlertAllUsers() { // Load two documents, each in two sessions. Tell one session to fake a disk full // situation. Expect to get the corresponding error back in all sessions. + static_assert(MAX_DOCUMENTS >= 2, "MAX_DOCUMENTS must be at least 2"); const auto testname = "alertAllUsers "; try { @@ -2207,18 +2208,20 @@ void HTTPWSTest::testAlertAllUsers() Poco::Net::HTTPRequest* request[2]; for (int i = 0; i < 2; i++) + { request[i] = new Poco::Net::HTTPRequest(Poco::Net::HTTPRequest::HTTP_GET, docURL[i]); + } std::shared_ptr<LOOLWebSocket> socket[4]; - for (int i = 0; i < 4; i++) + for (int i = 0; i < 2; i++) { - socket[i] = connectLOKit(_uri, *(request[i/2]), _response); - sendTextFrame(socket[i], "load url=" + docURL[i/2], testname); + socket[i] = connectLOKit(_uri, *(request[i%2]), _response); + sendTextFrame(socket[i], "load url=" + docURL[i%2], testname); } sendTextFrame(socket[0], "uno .uno:fakeDiskFull", testname); - for (int i = 0; i < 4; i++) + for (int i = 0; i < 2; i++) { std::string response = getResponseString(socket[i], "error:", testname); Poco::StringTokenizer tokens(response.substr(6), " ", Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
