]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1736] More review comments
authorThomas Markwalder <tmark@isc.org>
Thu, 22 Apr 2021 20:05:48 +0000 (16:05 -0400)
committerThomas Markwalder <tmark@isc.org>
Fri, 23 Apr 2021 12:54:32 +0000 (08:54 -0400)
    Cosmetics.

src/hooks/dhcp/high_availability/communication_state.h
src/hooks/dhcp/high_availability/tests/ha_mt_unittest.cc

index 1fd27d9559d6a61be56acf4666d6286b9e971226..0296c75048ee441669b651fe2d8bf30be3601db4 100644 (file)
@@ -289,8 +289,8 @@ protected:
 
 public:
 
-    /// @brief Indicates whether the HA service should issue a warning about
-    /// high clock skew between the active servers.
+    /// @brief Issues a warning about high clock skew between the active
+    /// servers if one is warranted.
     ///
     /// The HA service monitors the clock skew between the active servers. The
     /// clock skew is calculated from the local time and the time returned by
@@ -314,8 +314,8 @@ public:
     bool clockSkewShouldWarn();
 
 private:
-    /// @brief Indicates whether the HA service and issues a warning about
-    /// high clock skew between the active servers if warranted.
+    /// @brief Issues a warning about high clock skew between the active
+    /// servers if one is warranted.
     ///
     /// The HA service monitors the clock skew between the active servers. The
     /// clock skew is calculated from the local time and the time returned by
@@ -376,8 +376,6 @@ private:
     /// @return true if the HA service should enter "terminated" state.
     bool clockSkewShouldTerminateInternal() const;
 
-//protected:
-
     /// @brief Checks if the clock skew is greater than the specified number
     /// of seconds.
     ///
index 5f5e00b899a6d7a6df3849a095bab6f84d9f6a3a..a2e62945da72227a5e7663e6035e210641bad8b2 100644 (file)
@@ -157,7 +157,7 @@ TEST_F(HAMtServiceTest, multiThreadingStartup) {
         bool dhcp_mt_enabled_;          // True if DHCP multi-threading is enabled.
         uint32_t dhcp_threads_;         // Value of DHCP thread-pool-size.
         bool exp_ha_mt_enabled_;        // If HA+MT should be enabled
-        bool exp_listener_;             // if HA+MT should use dedicated listener.
+        bool exp_listener_;             // If HA+MT should use dedicated listener.
         uint32_t exp_listener_threads_; // Expected number of listener threads.
         uint32_t exp_client_threads_;   // Expected number of client threads.
     };
@@ -184,22 +184,22 @@ TEST_F(HAMtServiceTest, multiThreadingStartup) {
             !ha_mt, !listener, 0, 0
         },
         {
-            "3 dhcp mt disabled, mt enabled",
+            "3 dhcp mt disabled, ha mt enabled",
             makeHAMtJson(ha_mt, listener, 0, 0),
             !dhcp_mt, 4,
             !ha_mt, !listener, 0, 0
         },
         {
-            "4 dhcp mt enabled, mt enabled, listener disabled",
+            "4 dhcp mt enabled, ha mt enabled, listener disabled",
             makeHAMtJson(ha_mt, !listener, 0, 0),
             dhcp_mt, 4,
             ha_mt, !listener, 4, 4
         },
         {
-            "5 dhcp mt enabled, mt enabled, listener enabled",
-            makeHAMtJson(ha_mt, !listener, 0, 0),
+            "5 dhcp mt enabled, ha mt enabled, listener enabled",
+            makeHAMtJson(ha_mt, listener, 0, 0),
             dhcp_mt, 4,
-            ha_mt, !listener, 4, 4
+            ha_mt, listener, 4, 4
         },
         {
             "6 explicit DHCP threads, explicit thread values",