a sleep to confurency test
Main LMDBAL workfow / Archlinux (push) Successful in 38s Details

This commit is contained in:
Blue 2023-10-21 16:45:18 -03:00
parent 0079f6e96e
commit a0eebc978d
Signed by: blue
GPG Key ID: 9B203B252A63EE38
1 changed files with 2 additions and 0 deletions

View File

@ -182,6 +182,7 @@ TEST_F(CacheTransactionsTest, ConcurentModification) {
int pid = fork();
if (pid == 0) { // I am the child
usleep(1);
std::cout << "beggining second transaction" << std::endl;
LMDBAL::WriteTransaction txn2 = db->beginTransaction(); //<--- this is where the execution should pause
//and wait for the first transaction to get finished
@ -234,6 +235,7 @@ TEST_F(CacheTransactionsTest, RAIIResourceFree) {
int pid = fork();
if (pid == 0) { // I am the child
usleep(1);
std::cout << "beggining child transaction" << std::endl;
LMDBAL::WriteTransaction txn2 = db->beginTransaction(); //<--- this is where the execution should pause
//and wait for the first transaction to get finished