Commit 3cd2f11f authored by Razvan Becheriu's avatar Razvan Becheriu

[#1040] updated unittests

parent e57f523f
......@@ -443,6 +443,7 @@ TEST(CqlOpenTest, OpenDatabase) {
// Tidy up after the test
destroyCqlSchema();
LeaseMgrFactory::destroy();
}
/// @brief Check the getType() method
......
......@@ -335,6 +335,12 @@ TEST_F(MySqlLeaseMgrTest, updateLease4) {
testUpdateLease4();
}
/// @brief Lease4 update tests
TEST_F(MySqlLeaseMgrTest, updateLease4MultiThreading) {
MultiThreadingMgr::instance().setMode(true);
testUpdateLease4();
}
/// @brief Lease4 concurrent update tests
///
/// Checks that we are not able to concurrently update a lease in the database.
......@@ -342,10 +348,12 @@ TEST_F(MySqlLeaseMgrTest, concurrentUpdateLease4) {
testConcurrentUpdateLease4();
}
/// @brief Lease4 update tests
TEST_F(MySqlLeaseMgrTest, updateLease4MultiThreading) {
/// @brief Lease4 concurrent update tests
///
/// Checks that we are not able to concurrently update a lease in the database.
TEST_F(MySqlLeaseMgrTest, concurrentUpdateLease4MultiThreading) {
MultiThreadingMgr::instance().setMode(true);
testUpdateLease4();
testConcurrentUpdateLease4();
}
/// @brief Check GetLease4 methods - access by Hardware Address
......@@ -777,6 +785,12 @@ TEST_F(MySqlLeaseMgrTest, updateLease6) {
testUpdateLease6();
}
/// @brief Lease6 update tests
TEST_F(MySqlLeaseMgrTest, updateLease6MultiThreading) {
MultiThreadingMgr::instance().setMode(true);
testUpdateLease6();
}
/// @brief Lease6 concurrent update tests
///
/// Checks that we are not able to concurrently update a lease in the database.
......@@ -784,10 +798,12 @@ TEST_F(MySqlLeaseMgrTest, concurrentUpdateLease6) {
testConcurrentUpdateLease6();
}
/// @brief Lease6 update tests
TEST_F(MySqlLeaseMgrTest, updateLease6MultiThreading) {
/// @brief Lease6 concurrent update tests
///
/// Checks that we are not able to concurrently update a lease in the database.
TEST_F(MySqlLeaseMgrTest, concurrentUpdateLease6MultiThreading) {
MultiThreadingMgr::instance().setMode(true);
testUpdateLease6();
testConcurrentUpdateLease6();
}
/// @brief DHCPv4 Lease recreation tests
......
......@@ -196,6 +196,7 @@ TEST(PgSqlOpenTest, OpenDatabase) {
// Tidy up after the test
destroyPgSQLSchema();
LeaseMgrFactory::destroy();
}
/// @brief Check that database can be opened with Multi-Threading
......@@ -290,6 +291,12 @@ TEST_F(PgSqlLeaseMgrTest, updateLease4) {
testUpdateLease4();
}
/// @brief Lease4 update tests
TEST_F(PgSqlLeaseMgrTest, updateLease4MultiThreading) {
MultiThreadingMgr::instance().setMode(true);
testUpdateLease4();
}
/// @brief Lease4 concurrent update tests
///
/// Checks that we are not able to concurrently update a lease in the database.
......@@ -297,10 +304,12 @@ TEST_F(PgSqlLeaseMgrTest, concurrentUpdateLease4) {
testConcurrentUpdateLease4();
}
/// @brief Lease4 update tests
TEST_F(PgSqlLeaseMgrTest, updateLease4MultiThreading) {
/// @brief Lease4 concurrent update tests
///
/// Checks that we are not able to concurrently update a lease in the database.
TEST_F(PgSqlLeaseMgrTest, concurrentUpdateLease4MultiThreading) {
MultiThreadingMgr::instance().setMode(true);
testUpdateLease4();
testConcurrentUpdateLease4();
}
/// @brief Check GetLease4 methods - access by Hardware Address
......@@ -732,6 +741,12 @@ TEST_F(PgSqlLeaseMgrTest, updateLease6) {
testUpdateLease6();
}
/// @brief Lease6 update tests
TEST_F(PgSqlLeaseMgrTest, updateLease6MultiThreading) {
MultiThreadingMgr::instance().setMode(true);
testUpdateLease6();
}
/// @brief Lease6 concurrent update tests
///
/// Checks that we are not able to concurrently update a lease in the database.
......@@ -739,10 +754,12 @@ TEST_F(PgSqlLeaseMgrTest, concurrentUpdateLease6) {
testConcurrentUpdateLease6();
}
/// @brief Lease6 update tests
TEST_F(PgSqlLeaseMgrTest, updateLease6MultiThreading) {
/// @brief Lease6 concurrent update tests
///
/// Checks that we are not able to concurrently update a lease in the database.
TEST_F(PgSqlLeaseMgrTest, concurrentUpdateLease6MultiThreading) {
MultiThreadingMgr::instance().setMode(true);
testUpdateLease6();
testConcurrentUpdateLease6();
}
/// @brief DHCPv4 Lease recreation tests
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment