Being portable C++ code, our project has an abstraction layer over threads. This layer has unit tests. This includes tests like that Thread::sleep(100) wakes up in 130 ms, that CondVar::notify() wakes up the other thread in 50 ms and similar. Obviously this occasionally fails, especially when the computer is also doing something else.Is it normal to test these things? Is there a way to still test them and make the tests pass reliably for continuous integrationwhere the server might be running a second build in parallel, so it is doing something else too.
Unit testing thread abstraction
unit testing;multithreading;continuous integration