]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3668] Further changes after second review.
authorMarcin Siodelski <marcin@isc.org>
Tue, 20 Jan 2015 11:03:54 +0000 (12:03 +0100)
committerMarcin Siodelski <marcin@isc.org>
Tue, 20 Jan 2015 11:03:54 +0000 (12:03 +0100)
- Pass io_service to D2Process as a const reference
- Fix issues in memfile unittest

src/bin/d2/d2_process.cc
src/bin/d2/d2_process.h
src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc

index 73e10fb4586290d642a6925c28df48936ebeb24b..e8c9942dfb79e9fcc74d2e5851ff5d206590954a 100644 (file)
@@ -26,7 +26,7 @@ namespace d2 {
 // be configurable.
 const unsigned int D2Process::QUEUE_RESTART_PERCENT =  80;
 
-D2Process::D2Process(const char* name, asiolink::IOServicePtr io_service)
+D2Process::D2Process(const char* name, const asiolink::IOServicePtr& io_service)
     : DProcessBase(name, io_service, DCfgMgrBasePtr(new D2CfgMgr())),
      reconf_queue_flag_(false), shutdown_type_(SD_NORMAL) {
 
index fa624ddb529ecfaf815a7417633a47c602b7b6aa..d94022b11d996545acbd080b595b9a482ccbfdaf 100644 (file)
@@ -66,7 +66,7 @@ public:
     /// asynchronous event handling.
     ///
     /// @throw DProcessBaseError is io_service is NULL.
-    D2Process(const char* name, asiolink::IOServicePtr io_service);
+    D2Process(const char* name, const asiolink::IOServicePtr& io_service);
 
     /// @brief Called after instantiation to perform initialization unique to
     /// D2.
index 22c8072bf84f575c39f54cb8f5ba8bbbd553a262..713702d2c731f98bb5ed6cd1bc5b73f2582b9b08 100644 (file)
@@ -335,7 +335,7 @@ TEST_F(MemfileLeaseMgrTest, lfcTimerDisabled) {
 // at which the IOService must be executed to run the handlers
 // for the installed timers.
 TEST_F(MemfileLeaseMgrTest, getIOServiceExecInterval) {
-        LeaseMgr::ParameterMap pmap;
+    LeaseMgr::ParameterMap pmap;
     pmap["type"] = "memfile";
     pmap["universe"] = "4";
     pmap["name"] = getLeaseFilePath("leasefile4_0.csv");
@@ -345,14 +345,14 @@ TEST_F(MemfileLeaseMgrTest, getIOServiceExecInterval) {
     EXPECT_EQ(0, lease_mgr->getIOServiceExecInterval());
 
     // lfc-interval = 10
-    pmap["lfc-interval"] = 10;
+    pmap["lfc-interval"] = "10";
     lease_mgr.reset(new LFCMemfileLeaseMgr(pmap));
     EXPECT_EQ(10, lease_mgr->getIOServiceExecInterval());
 
     // lfc-interval = 20
-    pmap["lfc-interval"] = 20;
+    pmap["lfc-interval"] = "20";
     lease_mgr.reset(new LFCMemfileLeaseMgr(pmap));
-    EXPECT_EQ(10, lease_mgr->getIOServiceExecInterval());
+    EXPECT_EQ(20, lease_mgr->getIOServiceExecInterval());
 
 }