loolwsd/test/httpwstest.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
New commits: commit 42a88e2362e78509d2ad7341b1d5f48086138430 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Thu Apr 28 22:48:19 2016 -0400 loolwsd: fix load test regression Change-Id: Icadd22306f61338698aedb1b6b5d4e02246d9a4e Reviewed-on: https://gerrit.libreoffice.org/24482 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp index 9994f92..e052b99 100644 --- a/loolwsd/test/httpwstest.cpp +++ b/loolwsd/test/httpwstest.cpp @@ -332,25 +332,25 @@ void HTTPWSTest::loadDoc(const std::string& documentURL) // Load a document and get its status. auto socket = loadDocAndGetSocket(_uri, documentURL); - std::string status; - std::string editlock; SocketProcessor("", socket, [&](const std::string& msg) { const std::string prefix = "status: "; if (msg.find(prefix) == 0) { - status = msg.substr(prefix.length()); + const auto status = msg.substr(prefix.length()); + // Might be too strict, consider something flexible instread. + CPPUNIT_ASSERT_EQUAL(std::string("type=text parts=1 current=0 width=12808 height=16408"), status); + } + else if (msg.find("editlock") == 0) + { + // First session always gets the lock. + CPPUNIT_ASSERT_EQUAL(std::string("editlock: 1"), msg); return false; } return true; }); - // Might be too strict, consider something flexible instread. - CPPUNIT_ASSERT_EQUAL(std::string("type=text parts=1 current=0 width=12808 height=16408"), status); - // First session always gets the lock. - CPPUNIT_ASSERT_EQUAL(std::string("editlock: 1"), editlock); - socket->shutdown(); } catch (const Poco::Exception& exc) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits