From a67b77a7cc2ad07f8d95479badafbde683c6c43d Mon Sep 17 00:00:00 2001 From: Razvan Becheriu Date: Wed, 5 Feb 2020 22:45:39 +0200 Subject: [PATCH] [#1074] minor changes --- .../tests/cql_host_data_source_unittest.cc | 8 ++++---- .../tests/mysql_host_data_source_unittest.cc | 16 ++++++++-------- .../tests/pgsql_host_data_source_unittest.cc | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/lib/dhcpsrv/tests/cql_host_data_source_unittest.cc b/src/lib/dhcpsrv/tests/cql_host_data_source_unittest.cc index d4fbcf7e96..1f926534c3 100644 --- a/src/lib/dhcpsrv/tests/cql_host_data_source_unittest.cc +++ b/src/lib/dhcpsrv/tests/cql_host_data_source_unittest.cc @@ -190,8 +190,8 @@ TEST(CqlHostDataSource, OpenDatabase) { // Ensure we have the proper schema with no transient data. createCqlSchema(); - // Check that host manager open the database opens correctly and tidy up. - // If it fails, print the error message. + // Check that host manager opens the database correctly and tidy up. If it + // fails, print the error message. try { HostMgr::create(); EXPECT_NO_THROW(HostMgr::addBackend(validCqlConnectionString())); @@ -203,7 +203,7 @@ TEST(CqlHostDataSource, OpenDatabase) { << "*** before the CQL tests will run correctly.\n"; } - // Check that host manager open the database opens correctly with a longer + // Check that host manager opens the database correctly with a longer // timeout. If it fails, print the error message. try { // CQL specifies the timeout values in ms, not seconds. Therefore @@ -221,7 +221,7 @@ TEST(CqlHostDataSource, OpenDatabase) { } // Check that attempting to get an instance of the host data source when - // none is set throws an exception. + // none is set returns empty pointer. EXPECT_FALSE(HostMgr::instance().getHostDataSource()); // Check that wrong specification of backend throws an exception. diff --git a/src/lib/dhcpsrv/tests/mysql_host_data_source_unittest.cc b/src/lib/dhcpsrv/tests/mysql_host_data_source_unittest.cc index a12d189fa5..101f0ff469 100644 --- a/src/lib/dhcpsrv/tests/mysql_host_data_source_unittest.cc +++ b/src/lib/dhcpsrv/tests/mysql_host_data_source_unittest.cc @@ -163,8 +163,8 @@ TEST(MySqlHostDataSource, OpenDatabase) { destroyMySQLSchema(); createMySQLSchema(); - // Check that host manager open the database opens correctly and tidy up. - // If it fails, print the error message. + // Check that host manager opens the database correctly and tidy up. If it + // fails, print the error message. try { HostMgr::create(); EXPECT_NO_THROW(HostMgr::addBackend(validMySQLConnectionString())); @@ -176,7 +176,7 @@ TEST(MySqlHostDataSource, OpenDatabase) { << "*** before the MySQL tests will run correctly.\n"; } - // Check that host manager open the database opens correctly with a longer + // Check that host manager opens the database correctly with a longer // timeout. If it fails, print the error message. try { string connection_string = validMySQLConnectionString() + string(" ") + @@ -192,7 +192,7 @@ TEST(MySqlHostDataSource, OpenDatabase) { } // Check that attempting to get an instance of the host data source when - // none is set throws an exception. + // none is set returns empty pointer. EXPECT_FALSE(HostMgr::instance().getHostDataSource()); // Check that wrong specification of backend throws an exception. @@ -251,8 +251,8 @@ TEST(MySqlHostDataSource, OpenDatabaseMultiThreading) { destroyMySQLSchema(); createMySQLSchema(); - // Check that host manager open the database opens correctly and tidy up. - // If it fails, print the error message. + // Check that host manager opens the database correctly and tidy up. If it + // fails, print the error message. try { HostMgr::create(); EXPECT_NO_THROW(HostMgr::addBackend(validMySQLConnectionString())); @@ -264,7 +264,7 @@ TEST(MySqlHostDataSource, OpenDatabaseMultiThreading) { << "*** before the MySQL tests will run correctly.\n"; } - // Check that host manager open the database opens correctly with a longer + // Check that host manager opens the database correctly with a longer // timeout. If it fails, print the error message. try { string connection_string = validMySQLConnectionString() + string(" ") + @@ -280,7 +280,7 @@ TEST(MySqlHostDataSource, OpenDatabaseMultiThreading) { } // Check that attempting to get an instance of the host data source when - // none is set throws an exception. + // none is set returns empty pointer. EXPECT_FALSE(HostMgr::instance().getHostDataSource()); // Check that wrong specification of backend throws an exception. diff --git a/src/lib/dhcpsrv/tests/pgsql_host_data_source_unittest.cc b/src/lib/dhcpsrv/tests/pgsql_host_data_source_unittest.cc index d18b31851a..028c6aa786 100644 --- a/src/lib/dhcpsrv/tests/pgsql_host_data_source_unittest.cc +++ b/src/lib/dhcpsrv/tests/pgsql_host_data_source_unittest.cc @@ -161,8 +161,8 @@ TEST(PgSqlHostDataSource, OpenDatabase) { destroyPgSQLSchema(); createPgSQLSchema(); - // Check that host manager open the database opens correctly and tidy up. - // If it fails, print the error message. + // Check that host manager opens the database correctly and tidy up. If it + // fails, print the error message. try { HostMgr::create(); EXPECT_NO_THROW(HostMgr::addBackend(validPgSQLConnectionString())); @@ -174,7 +174,7 @@ TEST(PgSqlHostDataSource, OpenDatabase) { << "*** before the PostgreSQL tests will run correctly.\n"; } - // Check that host manager open the database opens correctly with a longer + // Check that host manager opens the database correctly with a longer // timeout. If it fails, print the error message. try { string connection_string = validPgSQLConnectionString() + string(" ") + @@ -190,7 +190,7 @@ TEST(PgSqlHostDataSource, OpenDatabase) { } // Check that attempting to get an instance of the host data source when - // none is set throws an exception. + // none is set returns empty pointer. EXPECT_FALSE(HostMgr::instance().getHostDataSource()); // Check that wrong specification of backend throws an exception. @@ -246,8 +246,8 @@ TEST(PgSqlHostDataSource, OpenDatabaseMultiThreading) { destroyPgSQLSchema(); createPgSQLSchema(); - // Check that host manager open the database opens correctly and tidy up. - // If it fails, print the error message. + // Check that host manager opens the database correctly and tidy up. If it + // fails, print the error message. try { HostMgr::create(); EXPECT_NO_THROW(HostMgr::addBackend(validPgSQLConnectionString())); @@ -259,7 +259,7 @@ TEST(PgSqlHostDataSource, OpenDatabaseMultiThreading) { << "*** before the PostgreSQL tests will run correctly.\n"; } - // Check that host manager open the database opens correctly with a longer + // Check that host manager opens the database correctly with a longer // timeout. If it fails, print the error message. try { string connection_string = validPgSQLConnectionString() + string(" ") + @@ -275,7 +275,7 @@ TEST(PgSqlHostDataSource, OpenDatabaseMultiThreading) { } // Check that attempting to get an instance of the host data source when - // none is set throws an exception. + // none is set returns empty pointer. EXPECT_FALSE(HostMgr::instance().getHostDataSource()); // Check that wrong specification of backend throws an exception.