]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3297] Fix UT compilation and error
authorThomas Markwalder <tmark@isc.org>
Sat, 30 Mar 2024 14:45:00 +0000 (10:45 -0400)
committerRazvan Becheriu <razvan@isc.org>
Wed, 3 Apr 2024 12:14:35 +0000 (15:14 +0300)
modified:   perfmon_mgr_unittests.cc

src/hooks/dhcp/perfmon/tests/perfmon_mgr_unittests.cc

index 3d1c80fb618d7640d64db821f9df945f64d2f3a7..f390ae960841512e908c9e9f73b1272c7126973d 100644 (file)
@@ -213,9 +213,9 @@ public:
         std::string valid_config =
             R"({
                     "enable-monitoring": false,
-                    "interval-width-secs": 5,
+                    "interval-width-secs": 5000,
                     "stats-mgr-reporting": false,
-                    "alarm-report-secs": 600,
+                    "alarm-report-secs": 600000,
                     "alarms": [{
                             "duration-key": {
                                 "query-type": "",
@@ -385,7 +385,7 @@ public:
 
         // Verify the alarm should still be CLEAR since we have not yet completed the interval.
         AlarmPtr after_alarm;
-        beforeAndAfterAlarm(__LINE__, before_alarm, after_alarm, Alarm::CLEAR, false);
+        beforeAndAfterAlarm(__LINE__, before_alarm, Alarm::CLEAR, false);
 
         // No stats should have been reported.
         EXPECT_EQ(0, StatsMgr::instance().count());
@@ -407,7 +407,7 @@ public:
         EXPECT_EQ(80, obs->getInteger().first);
 
         // The alarm should have triggered and reported.
-        beforeAndAfterAlarm(__LINE__, before_alarm, after_alarm, Alarm::TRIGGERED, true);
+        beforeAndAfterAlarm(__LINE__, before_alarm, Alarm::TRIGGERED, true);
         addString("reported average duration 00:00:00.080000 exceeds high-water-ms: 50");
 
         // Sleep 100ms second to make sure the current interval duration elapses.
@@ -422,7 +422,7 @@ public:
         // The Alarm should still be TRIGGERED since the newly completed interval is
         // above high water.  The alarm should not report because the reporting
         // interval has not elapsed.
-        beforeAndAfterAlarm(__LINE__, before_alarm, after_alarm, Alarm::TRIGGERED, false);
+        beforeAndAfterAlarm(__LINE__, before_alarm, Alarm::TRIGGERED, false);
 
         // Sleep 100ms second to make sure the current interval duration elapses.
         usleep(100 * 1000);
@@ -436,7 +436,7 @@ public:
         // The Alarm should still be TRIGGERED since the newly completed interval is
         // above high water.  The alarm should report again because the reporting
         // interval has elapsed.
-        beforeAndAfterAlarm(__LINE__, before_alarm, after_alarm, Alarm::TRIGGERED, true);
+        beforeAndAfterAlarm(__LINE__, before_alarm, Alarm::TRIGGERED, true);
         addString("reported average duration 00:00:00.100000 exceeds high-water-ms: 50");
 
         //  Should have one stat reported with a value of 100.
@@ -456,7 +456,7 @@ public:
 
         // The Alarm should now be CLEAR since the newly completed interval is
         // below high water. The alarm should low-water report.
-        beforeAndAfterAlarm(__LINE__, before_alarm, after_alarm, Alarm::CLEAR, false);
+        beforeAndAfterAlarm(__LINE__, before_alarm, Alarm::CLEAR, false);
         addString("reported average duration 00:00:00.010000 is now beloe low-water-ms: 25");
 
         //  Should have one stat reported with a value of 10.
@@ -469,6 +469,11 @@ public:
         EXPECT_TRUE(checkFile());
     }
 
+    /// @brief Exercises PerfMonMgr::procssPacketEventStack().
+    void testProcesPacketEventStack() {
+       /*  YOU ARE HERE */
+    }
+
     /// @brief Protocol family AF_INET or AF_INET6
     uint16_t family_;