diff --git a/loolwsd/test/httpposttest.cpp b/loolwsd/test/httpposttest.cpp index a4bd19947..772210a94 100644 --- a/loolwsd/test/httpposttest.cpp +++ b/loolwsd/test/httpposttest.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include /// Tests the HTTP POST API of loolwsd. The server has to be started manually before running this test. class HTTPPostTest : public CPPUNIT_NS::TestFixture @@ -30,7 +30,7 @@ class HTTPPostTest : public CPPUNIT_NS::TestFixture void HTTPPostTest::testConvertTo() { - Poco::URI uri("http://127.0.0.1:" + std::to_string(LOOLWSD::DEFAULT_CLIENT_PORT_NUMBER)); + Poco::URI uri("http://127.0.0.1:" + std::to_string(ClientPortNumber)); Poco::Net::HTTPClientSession session(uri.getHost(), uri.getPort()); Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_POST, "/convert-to"); diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp index 415b4d9af..cb05b717f 100644 --- a/loolwsd/test/httpwstest.cpp +++ b/loolwsd/test/httpwstest.cpp @@ -11,12 +11,13 @@ #include #include #include +#include #include #include #include #include -#include +#include /// Tests the HTTP WebSocket API of loolwsd. The server has to be started manually before running this test. class HTTPWSTest : public CPPUNIT_NS::TestFixture @@ -38,7 +39,7 @@ class HTTPWSTest : public CPPUNIT_NS::TestFixture void sendTextFrame(Poco::Net::WebSocket& socket, const std::string& string); public: HTTPWSTest() - : _uri("http://127.0.0.1:" + std::to_string(LOOLWSD::DEFAULT_CLIENT_PORT_NUMBER)), + : _uri("http://127.0.0.1:" + std::to_string(ClientPortNumber)), _session(_uri.getHost(), _uri.getPort()), _request(Poco::Net::HTTPRequest::HTTP_POST, "/ws"), _socket(_session, _request, _response)