test/httpwstest.cpp | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-)
New commits: commit 9936ac18697887ae927830258e4c16e0c4726905 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sun Apr 2 14:48:59 2017 -0400 wsd: fix alertAllUsers test Issue the fake disk space error only after fully loading the doc. This prevents handling the error while loading, which terminates the session. Change-Id: I5acd9454b1aa9fb5d1f886fb23a76a2d808d4852 Reviewed-on: https://gerrit.libreoffice.org/36027 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/test/httpwstest.cpp b/test/httpwstest.cpp index 22fce917..55272f45 100644 --- a/test/httpwstest.cpp +++ b/test/httpwstest.cpp @@ -2334,28 +2334,15 @@ void HTTPWSTest::testAlertAllUsers() const auto testname = "alertAllUsers "; try { - std::string docPath[2]; - std::string docURL[2]; - - getDocumentPathAndURL("Example.odt", docPath[0], docURL[0], testname); - getDocumentPathAndURL("hello.odt", docPath[1], docURL[1], testname); - - 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 < 2; i++) - { - socket[i] = connectLOKit(_uri, *(request[i%2]), _response); - sendTextFrame(socket[i], "load url=" + docURL[i%2], testname); - } + socket[0] = loadDocAndGetSocket("hello.odt", _uri, testname); + socket[1] = loadDocAndGetSocket("Example.odt", _uri, testname); + + // Simulate disk full. sendTextFrame(socket[0], "uno .uno:fakeDiskFull", testname); + // Assert that both clients get the error. for (int i = 0; i < 2; i++) { const std::string response = assertResponseString(socket[i], "error:", testname); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits