diff options
-rw-r--r-- | libdbpp/mockDatabase.cpp | 2 | ||||
-rw-r--r-- | libdbpp/unittests/testConnection.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libdbpp/mockDatabase.cpp b/libdbpp/mockDatabase.cpp index 2d7a211..a0ae7e5 100644 --- a/libdbpp/mockDatabase.cpp +++ b/libdbpp/mockDatabase.cpp @@ -107,7 +107,7 @@ MockDatabase::UpdateStatusTable(DB::Connection * conn, const boost::filesystem:: MockServerDatabase::MockServerDatabase(const std::string & masterdb, const std::string & name, const std::string & type) : MockDatabase(name), - master(DB::ConnectionFactory::create(type, masterdb)), + master(DB::ConnectionFactory::createNew(type, masterdb)), testDbName(stringbf("test_%d_%d", getpid(), ++mocked)) { } diff --git a/libdbpp/unittests/testConnection.cpp b/libdbpp/unittests/testConnection.cpp index a707f2f..e5f7ae7 100644 --- a/libdbpp/unittests/testConnection.cpp +++ b/libdbpp/unittests/testConnection.cpp @@ -49,7 +49,7 @@ BOOST_AUTO_TEST_CASE( plugins ) BOOST_AUTO_TEST_CASE( create ) { - auto mock = DB::ConnectionFactory::create("MockDb", "doesn't matter"); + auto mock = DB::ConnectionFactory::createNew("MockDb", "doesn't matter"); BOOST_REQUIRE(mock); // MockDb is fake, just returns nullptr, but the call should otherwise succeed. BOOST_REQUIRE(!mock->newModifyCommand("")); @@ -59,12 +59,12 @@ BOOST_AUTO_TEST_CASE( create ) BOOST_AUTO_TEST_CASE( resolve ) { - BOOST_REQUIRE_THROW(DB::ConnectionFactory::create("otherdb", "doesn't matter"), AdHoc::LoadLibraryException); + BOOST_REQUIRE_THROW(DB::ConnectionFactory::createNew("otherdb", "doesn't matter"), AdHoc::LoadLibraryException); } BOOST_AUTO_TEST_CASE( parse ) { - auto mock = DB::ConnectionFactory::create("MockDb", "doesn't matter"); + auto mock = DB::ConnectionFactory::createNew("MockDb", "doesn't matter"); std::fstream s((rootDir / "parseTest.sql").string()); BOOST_REQUIRE(s.good()); mock->executeScript(s, rootDir); |