]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5586] Restored compiled out unit test
authorThomas Markwalder <tmark@isc.org>
Tue, 8 May 2018 19:53:11 +0000 (15:53 -0400)
committerThomas Markwalder <tmark@isc.org>
Tue, 8 May 2018 19:53:11 +0000 (15:53 -0400)
    src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc

src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc

index 1c1e4e3406e4769a29cab300e25bc764a5005108..5a3b7de35cc28c857f406c7614e201b184797f30 100644 (file)
@@ -124,8 +124,6 @@ TEST(MySqlOpenTest, OpenDatabase) {
                << "*** before the MySQL tests will run correctly.\n";
     }
 
-    LeaseMgrFactory::destroy();
-
     // Check that lease manager open the database opens correctly with a longer
     // timeout.  If it fails, print the error message.
     try {
@@ -141,8 +139,6 @@ TEST(MySqlOpenTest, OpenDatabase) {
                << "*** before the MySQL tests will run correctly.\n";
     }
 
-    LeaseMgrFactory::destroy();
-
     // Check that attempting to get an instance of the lease manager when
     // none is set throws an exception.
     EXPECT_THROW(LeaseMgrFactory::instance(), NoLeaseManager);
@@ -163,15 +159,9 @@ TEST(MySqlOpenTest, OpenDatabase) {
         MYSQL_VALID_TYPE, INVALID_NAME, VALID_HOST, VALID_USER, VALID_PASSWORD)),
         DbOpenError);
 
-#if 0
-    // @todo Under MacOS, connecting with an invalid host, causes a TCP/IP socket
-    // to be orphaned and never closed.  This can interfer with subsequent tests
-    // which attempt to locate and manipulate MySQL client socket descriptor.
-    // In the interests of progress, we'll just avoid this test.
     EXPECT_THROW(LeaseMgrFactory::create(connectionString(
         MYSQL_VALID_TYPE, VALID_NAME, INVALID_HOST, VALID_USER, VALID_PASSWORD)),
         DbOpenError);
-#endif
 
     EXPECT_THROW(LeaseMgrFactory::create(connectionString(
         MYSQL_VALID_TYPE, VALID_NAME, VALID_HOST, INVALID_USER, VALID_PASSWORD)),