[Libreoffice-commits] online.git: loolwsd/test
Tor Lillqvist
tml at collabora.com
Mon Apr 11 07:04:22 UTC 2016
loolwsd/test/httpwstest.cpp | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 1c9a6400b6c65c63e2a62f01f4bf6f8ab2177034
Author: Tor Lillqvist <tml at collabora.com>
Date: Mon Apr 11 10:00:45 2016 +0300
Make the testBadLoad() unit test pass again
The server sends an "editlock: 1" message even if no document has been
loaded. Ignore that while waiting for the "error:" message.
diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp
index aad1e37..794a031 100644
--- a/loolwsd/test/httpwstest.cpp
+++ b/loolwsd/test/httpwstest.cpp
@@ -203,6 +203,12 @@ void HTTPWSTest::testBadLoad()
{
std::cout << "Received message: " << LOOLProtocol::getAbbreviatedMessage(buffer, n) << std::endl;
const std::string line = LOOLProtocol::getFirstLine(buffer, n);
+
+ // For some reason the server claims a client has the 'edit lock' even if no
+ // document has been successfully loaded
+ if (LOOLProtocol::getFirstToken(buffer, n) == "editlock:")
+ continue;
+
CPPUNIT_ASSERT_EQUAL(std::string("error: cmd=status kind=nodocloaded"), line);
break;
}
More information about the Libreoffice-commits
mailing list