]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1661] Checkpoint: addressing comments
authorFrancis Dupont <fdupont@isc.org>
Tue, 23 Mar 2021 14:14:30 +0000 (15:14 +0100)
committerFrancis Dupont <fdupont@isc.org>
Wed, 24 Mar 2021 08:10:30 +0000 (09:10 +0100)
src/lib/http/tests/server_client_unittests.cc
src/lib/http/tests/tls_client_unittests.cc
src/lib/http/tests/tls_server_unittests.cc

index c859258a2c3b2c443113aba3307bc7b6ae24e1e6..9e1e0927725814d9f905f9f9abfdd1c8a2d8d9e6 100644 (file)
@@ -227,19 +227,10 @@ protected:
     /// This method is virtual so as it can be overridden when customized
     /// connections are to be used, e.g. in case of unit testing.
     ///
-    /// @param io_service IO service to be used by the connection.
-    /// @param acceptor Pointer to the TCP acceptor object used to listen for
-    /// new HTTP connections.
-    /// @param tls_context TLS context.
-    /// @param connection_pool Connection pool in which this connection is
-    /// stored.
     /// @param response_creator Pointer to the response creator object used to
     /// create HTTP response from the HTTP request received.
     /// @param acceptor_callback Callback invoked when new connection is accepted.
     /// @param handshake_callback Callback invoked when TLS handshake is performed.
-    /// @param request_timeout Configured timeout for a HTTP request.
-    /// @param idle_timeout Timeout after which persistent HTTP connection is
-    /// closed by the server.
     ///
     /// @return Pointer to the created connection.
     virtual HttpConnectionPtr createConnection(const HttpResponseCreatorPtr& response_creator,
index e6775d5c104c5a649ecb0951012d0753bccc255b..ab21dd1ba84d8685fbbd387e106e17d9e61f5df9 100644 (file)
@@ -1137,22 +1137,22 @@ public:
     TlsContextPtr client_context_;
 };
 
+#ifndef DISABLE_SOME_TESTS
 // Test that two consecutive requests can be sent over the same (persistent)
 // connection.
 TEST_F(HttpsClientTest, consecutiveRequests) {
-#ifndef DISABLE_SOME_TESTS
+
     ASSERT_NO_FATAL_FAILURE(testConsecutiveRequests(HttpVersion(1, 1)));
-#endif
 }
 
 // Test that two consecutive requests can be sent over the same (persistent)
 // connection.
 TEST_F(HttpsClientTest, consecutiveRequestsMultiThreading) {
     MultiThreadingMgr::instance().setMode(true);
-#ifndef DISABLE_SOME_TESTS
+
     ASSERT_NO_FATAL_FAILURE(testConsecutiveRequests(HttpVersion(1, 1)));
-#endif
 }
+#endif
 
 // Test that two consecutive requests can be sent over non-persistent connection.
 // This is achieved by sending HTTP/1.0 requests, which are non-persistent by
@@ -1249,13 +1249,13 @@ TEST_F(HttpsClientTest, DISABLED_clientRequestLateStartNoQueueMultiThreading) {
     testClientRequestLateStart(false);
 }
 
+#ifndef DISABLE_SOME_TESTS
 // This test verifies the behavior of the HTTP client when the premature
 // timeout occurs and there are requests queued after the request which
 // times out.
 TEST_F(HttpsClientTest, clientRequestLateStartQueue) {
-#ifndef DISABLE_SOME_TESTS
+
     testClientRequestLateStart(true);
-#endif
 }
 
 // This test verifies the behavior of the HTTP client when the premature
@@ -1263,10 +1263,9 @@ TEST_F(HttpsClientTest, clientRequestLateStartQueue) {
 // times out.
 TEST_F(HttpsClientTest, clientRequestLateStartQueueMultiThreading) {
     MultiThreadingMgr::instance().setMode(true);
-#ifndef DISABLE_SOME_TESTS
     testClientRequestLateStart(true);
-#endif
 }
+#endif
 
 // Test that client times out when connection takes too long.
 TEST_F(HttpsClientTest, clientConnectTimeout) {
@@ -1279,20 +1278,18 @@ TEST_F(HttpsClientTest, clientConnectTimeoutMultiThreading) {
     ASSERT_NO_FATAL_FAILURE(testClientConnectTimeout());
 }
 
+#ifndef DISABLE_SOME_TESTS
 /// Tests that connect and close callbacks work correctly.
 TEST_F(HttpsClientTest, connectCloseCallbacks) {
-#ifndef DISABLE_SOME_TESTS
     ASSERT_NO_FATAL_FAILURE(testConnectCloseCallbacks(HttpVersion(1, 1)));
-#endif
 }
 
 /// Tests that connect and close callbacks work correctly.
 TEST_F(HttpsClientTest, connectCloseCallbacksMultiThreading) {
     MultiThreadingMgr::instance().setMode(true);
-#ifndef DISABLE_SOME_TESTS
     ASSERT_NO_FATAL_FAILURE(testConnectCloseCallbacks(HttpVersion(1, 1)));
-#endif
 }
+#endif
 
 /// Tests that HttpClient::closeIfOutOfBand works correctly.
 TEST_F(HttpsClientTest, closeIfOutOfBand) {
index 44ecf081fbaafa28716b49fed78b648712196eae..c92127f2d33532967a6ae25fa8ce2d53276375d1 100644 (file)
@@ -231,19 +231,10 @@ protected:
     /// This method is virtual so as it can be overridden when customized
     /// connections are to be used, e.g. in case of unit testing.
     ///
-    /// @param io_service IO service to be used by the connection.
-    /// @param acceptor Pointer to the TCP acceptor object used to listen for
-    /// new HTTP connections.
-    /// @param tls_context TLS context.
-    /// @param connection_pool Connection pool in which this connection is
-    /// stored.
     /// @param response_creator Pointer to the response creator object used to
     /// create HTTP response from the HTTP request received.
     /// @param acceptor_callback Callback invoked when new connection is accepted.
     /// @param handshake_callback Callback invoked when TLS handshake is performed.
-    /// @param request_timeout Configured timeout for a HTTP request.
-    /// @param idle_timeout Timeout after which persistent HTTP connection is
-    /// closed by the server.
     ///
     /// @return Pointer to the created connection.
     virtual HttpConnectionPtr createConnection(const HttpResponseCreatorPtr& response_creator,