From: Thomas Markwalder Date: Tue, 8 May 2018 19:53:11 +0000 (-0400) Subject: [5586] Restored compiled out unit test X-Git-Tag: trac5536_base^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a14b57788faaace328c37d98153de68eaea6c7f0;p=thirdparty%2Fkea.git [5586] Restored compiled out unit test src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc --- diff --git a/src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc b/src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc index 1c1e4e3406..5a3b7de35c 100644 --- a/src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc +++ b/src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc @@ -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)),