Browse Source

[3971] Addressed other review comments.

Marcin Siodelski 9 years ago
parent
commit
fa0f966cf5

+ 1 - 3
src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc

@@ -356,9 +356,7 @@ TEST_F(MemfileLeaseMgrTest, lfcTimer) {
     // Run the test for at most 2.9 seconds.
     setTestTime(2900);
 
-    // Stop worker thread to make sure it is not running when lease
-    // manager is destroyed. The lease manager will be unable to
-    // unregster timer when the thread is active.
+    // Stop worker thread.
     ASSERT_NO_THROW(timer_mgr_->stopThread());
 
     // Within 2.9 we should record two LFC executions.

+ 3 - 1
src/lib/testutils/dhcp_test_lib.sh.in

@@ -250,7 +250,9 @@ cleanup() {
     # Use asterisk to remove all files starting with the given name,
     # in case the LFC has been run. LFC creates files with postfixes
     # appended to the lease file name.
-    rm -rf ${LEASE_FILE}*
+    if [ ! -z "${LEASE_FILE}" ]; then
+        rm -rf ${LEASE_FILE}*
+    fi
     rm -rf ${CFG_FILE}
     rm -rf ${KEACTRL_CFG_FILE}
 }