From a0eebc978d82f71e31b0766fa97b1d9dd38ab009 Mon Sep 17 00:00:00 2001 From: blue Date: Sat, 21 Oct 2023 16:45:18 -0300 Subject: [PATCH] a sleep to confurency test --- test/cachetransaction.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/cachetransaction.cpp b/test/cachetransaction.cpp index 6092dfb..e0bac76 100644 --- a/test/cachetransaction.cpp +++ b/test/cachetransaction.cpp @@ -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