mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-25 21:21:37 +00:00
fix(test): join threads and end the device on an early return
- an ASSERT_* between thread start and join() returned with a joinable std::thread, and its destructor called std::terminate() - the PluginServices fixture ended the device only from Idle; after a failure in another state, the join waited until the ctest timeout - use StateMachineThread in the Transitions tests and in the fixture, and JoiningThread in Region.LockOrder Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -404,7 +404,7 @@ void RegionLockOrder(const string& _address)
|
||||
ASSERT_EQ(push.Send(msg), 100);
|
||||
}
|
||||
|
||||
thread creator([&] {
|
||||
test::JoiningThread creator([&] {
|
||||
for (int i = 0; i < numIterations; ++i) {
|
||||
auto region = factory1->CreateUnmanagedRegion(10000, [](void*, size_t, void*) {});
|
||||
}
|
||||
@@ -416,7 +416,7 @@ void RegionLockOrder(const string& _address)
|
||||
ASSERT_NE(msg->GetData(), nullptr); // opens the peer region in factory1
|
||||
}
|
||||
|
||||
creator.join();
|
||||
creator.Join();
|
||||
}
|
||||
|
||||
TEST(RegionsSizeMismatch, shmem)
|
||||
|
||||
Reference in New Issue
Block a user