2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 05:27:55 +00:00

[#1040] updated unittests

This commit is contained in:
Razvan Becheriu 2020-01-17 15:37:27 +02:00
parent e57f523f52
commit 3cd2f11f10
3 changed files with 46 additions and 12 deletions

View File

@ -443,6 +443,7 @@ TEST(CqlOpenTest, OpenDatabase) {
// Tidy up after the test
destroyCqlSchema();
LeaseMgrFactory::destroy();
}
/// @brief Check the getType() method

View File

@ -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

View File

@ -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