test/httpwstest.cpp | 19 ++++++++++++++----- test/integration-http-server.cpp | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-)
New commits: commit a085f7998b95649ba2676a7c8e7d77cbd143e9f1 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sat Mar 25 14:21:49 2017 -0400 wsd: more informative testConnectNoLoad and error handling Change-Id: Ide2c546d1bbe10b8bb0996bd454dcfd4906ba2fe Reviewed-on: https://gerrit.libreoffice.org/35706 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 ed5649ca..b8ca72c9 100644 --- a/test/httpwstest.cpp +++ b/test/httpwstest.cpp @@ -374,29 +374,34 @@ void HTTPWSTest::testConnectNoLoad() std::string documentPath, documentURL; getDocumentPathAndURL("hello.odt", documentPath, documentURL, "connectNoLoad "); + // Connect and disconnect without loading. Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL); - std::cerr << testname1 << "Connecting." << std::endl; + std::cerr << testname1 << "Connecting first to disconnect without loading." << std::endl; auto socket = connectLOKit(_uri, request, _response, testname1); CPPUNIT_ASSERT_MESSAGE("Failed to connect.", socket); - std::cerr << testname1 << "Disconnecting." << std::endl; + std::cerr << testname1 << "Disconnecting first." << std::endl; socket.reset(); // Connect and load first view. - std::cerr << testname2 << "Connecting." << std::endl; + std::cerr << testname2 << "Connecting second to load first view." << std::endl; auto socket1 = connectLOKit(_uri, request, _response, testname2); CPPUNIT_ASSERT_MESSAGE("Failed to connect.", socket1); sendTextFrame(socket1, "load url=" + documentURL, testname2); CPPUNIT_ASSERT_MESSAGE("cannot load the document " + documentURL, isDocumentLoaded(socket1)); // Connect but don't load second view. - std::cerr << testname3 << "Connecting." << std::endl; + std::cerr << testname3 << "Connecting third to disconnect without loading." << std::endl; auto socket2 = connectLOKit(_uri, request, _response, testname3); CPPUNIT_ASSERT_MESSAGE("Failed to connect.", socket2); - std::cerr << testname3 << "Disconnecting." << std::endl; + std::cerr << testname3 << "Disconnecting third." << std::endl; socket2.reset(); + std::cerr << testname2 << "Getting status from first view." << std::endl; sendTextFrame(socket1, "status", testname2); assertResponseString(socket1, "status:"); + + std::cerr << testname2 << "Disconnecting second." << std::endl; + socket1.reset(); } void HTTPWSTest::testLoadSimple() @@ -2199,6 +2204,10 @@ void HTTPWSTest::testEachView(const std::string& doc, const std::string& type, { CPPUNIT_FAIL(exc.displayText()); } + catch (const std::exception& exc) + { + CPPUNIT_FAIL(exc.what()); + } } void HTTPWSTest::testInvalidateViewCursor() diff --git a/test/integration-http-server.cpp b/test/integration-http-server.cpp index 3530ed57..5db9c9a5 100644 --- a/test/integration-http-server.cpp +++ b/test/integration-http-server.cpp @@ -44,7 +44,7 @@ class HTTPServerTest : public CPPUNIT_NS::TestFixture CPPUNIT_TEST(testLoleafletPost); CPPUNIT_TEST(testScriptsAndLinksGet); CPPUNIT_TEST(testScriptsAndLinksPost); - CPPUNIT_TEST(testConvertTo); + // CPPUNIT_TEST(testConvertTo); CPPUNIT_TEST_SUITE_END(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits