loolwsd/test/httpwstest.cpp |   27 ---------------------------
 1 file changed, 27 deletions(-)

New commits:
commit 8c9fdace59cc36336d85653a76f797810add9c97
Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk>
Date:   Fri May 13 13:44:54 2016 -0400

    loolwsd: temporary documents are auto-removed on process exit
    
    Change-Id: I8f24de216823ed3535810f93affabd4f2ce89eb6
    Reviewed-on: https://gerrit.libreoffice.org/24989
    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 c5418cb..213f9cd 100644
--- a/loolwsd/test/httpwstest.cpp
+++ b/loolwsd/test/httpwstest.cpp
@@ -263,9 +263,6 @@ void HTTPWSTest::testHandShake()
             CPPUNIT_ASSERT(std::strstr(buffer, 
SERVICE_UNAVALABLE_INTERNAL_ERROR) != nullptr);
             CPPUNIT_ASSERT((flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) == 
Poco::Net::WebSocket::FRAME_OP_CLOSE);
         }
-
-        socket.shutdown();
-        Util::removeFile(documentPath);
     }
     catch (const Poco::Exception& exc)
     {
@@ -358,7 +355,6 @@ void HTTPWSTest::testLoad()
     std::string documentPath, documentURL;
     getDocumentPathAndURL("hello.odt", documentPath, documentURL);
     loadDoc(documentURL);
-    Util::removeFile(documentPath);
 }
 
 void HTTPWSTest::testBadLoad()
@@ -398,9 +394,6 @@ void HTTPWSTest::testBadLoad()
             }
         }
         while (n > 0 && (flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) != 
Poco::Net::WebSocket::FRAME_OP_CLOSE);
-
-        socket.shutdown();
-        Util::removeFile(documentPath);
     }
     catch (const Poco::Exception& exc)
     {
@@ -416,8 +409,6 @@ void HTTPWSTest::testReload()
     {
         loadDoc(documentURL);
     }
-
-    Util::removeFile(documentPath);
 }
 
 void HTTPWSTest::testSaveOnDisconnect()
@@ -501,8 +492,6 @@ void HTTPWSTest::testSaveOnDisconnect()
             }
         }
         while (n > 0 && (flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) != 
Poco::Net::WebSocket::FRAME_OP_CLOSE);
-        socket.shutdown();
-        Util::removeFile(documentPath);
         CPPUNIT_ASSERT_EQUAL(std::string("aaa bbb ccc"), selection);
     }
     catch (const Poco::Exception& exc)
@@ -590,8 +579,6 @@ void HTTPWSTest::testReloadWhileDisconnecting()
             }
         }
         while (n > 0 && (flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) != 
Poco::Net::WebSocket::FRAME_OP_CLOSE);
-        socket.shutdown();
-        Util::removeFile(documentPath);
         CPPUNIT_ASSERT_EQUAL(std::string("aaa bbb ccc"), selection);
     }
     catch (const Poco::Exception& exc)
@@ -839,8 +826,6 @@ void 
HTTPWSTest::testPasswordProtectedDocumentWithoutPassword()
             CPPUNIT_ASSERT_EQUAL(std::string("load"), errorCommand);
             CPPUNIT_ASSERT_EQUAL(std::string("passwordrequired:to-view"), 
errorKind);
         }
-        socket.shutdown();
-        Util::removeFile(documentPath);
     }
     catch (const Poco::Exception& exc)
     {
@@ -875,8 +860,6 @@ void 
HTTPWSTest::testPasswordProtectedDocumentWithWrongPassword()
             CPPUNIT_ASSERT_EQUAL(std::string("load"), errorCommand);
             CPPUNIT_ASSERT_EQUAL(std::string("wrongpassword"), errorKind);
         }
-        socket.shutdown();
-        Util::removeFile(documentPath);
     }
     catch (const Poco::Exception& exc)
     {
@@ -898,8 +881,6 @@ void 
HTTPWSTest::testPasswordProtectedDocumentWithCorrectPassword()
         sendTextFrame(socket, "load url=" + documentURL + " password=1");
 
         CPPUNIT_ASSERT_MESSAGE("cannot load the document with correct password 
" + documentURL, isDocumentLoaded(socket));
-        socket.shutdown();
-        Util::removeFile(documentPath);
     }
     catch (const Poco::Exception& exc)
     {
@@ -1001,9 +982,6 @@ void HTTPWSTest::testInsertDelete()
         CPPUNIT_ASSERT_MESSAGE("did not receive a status: message as 
expected", !response.empty());
         getPartHashCodes(response, parts);
         CPPUNIT_ASSERT_EQUAL(1, (int)parts.size());
-
-        socket.shutdown();
-        Util::removeFile(documentPath);
     }
     catch (const Poco::Exception& exc)
     {
@@ -1185,8 +1163,6 @@ void HTTPWSTest::testSlideShow()
             CPPUNIT_ASSERT_EQUAL(Poco::Net::HTTPResponse::HTTP_OK, 
responseSVG.getStatus());
             CPPUNIT_ASSERT_EQUAL(std::string("image/svg+xml"), 
responseSVG.getContentType());
         }
-        socket.shutdown();
-        Util::removeFile(documentPath);
     }
     catch (const Poco::Exception& exc)
     {
@@ -1464,9 +1440,6 @@ void HTTPWSTest::testLimitCursor( 
std::function<void(const std::shared_ptr<Poco:
 
     // check new document size
     checkhandler(docWidth, docHeight, newWidth, newHeight);
-
-    socket->shutdown();
-    Util::removeFile(docPath);
 }
 
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to