Commit 24f193a9 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

tests: samples: Fix potential deadlock on teardown

Fix #362
parent 28a87de4
Pipeline #126191 passed with stage
in 2 minutes and 52 seconds
...@@ -252,6 +252,12 @@ void Tests::SetUp( const std::string& testSuite, const std::string& testName ) ...@@ -252,6 +252,12 @@ void Tests::SetUp( const std::string& testSuite, const std::string& testName )
void Tests::TearDown() void Tests::TearDown()
{ {
/*
* Ensures we release the mutex to avoid joining threads deadlocking while
* potentially invoking their final callbacks
* See #362
*/
m_lock.release();
/* Ensure we are closing our database connection before we try to delete it */ /* Ensure we are closing our database connection before we try to delete it */
m_ml.reset(); m_ml.reset();
ASSERT_TRUE( utils::fs::rmdir( m_testDir ) ); ASSERT_TRUE( utils::fs::rmdir( m_testDir ) );
......
Supports Markdown
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