When running my tests in Qt 5.3.0, the output is cluttered with warnings about qSleep taking longer than expected:
WARNING: MyTestClass::myTestFunction() QTest::qSleep() should have taken 10000000ns, but actually took 16281196ns!
qSleep is never used in my tests, but probably internally in Qt code.
This warning feature that's a bit misbehaving here was introduced by Ulf in the following commit:
I fully understand the reasoning behind having such a warning message, but on some systems (e.g. mine), qSleep taking longer than expected seems to be the normal case rather than the exception. This renders the warnings useless or even harmful. I now need to send the test output through grep to filter all the warnings out and see what's actually important.
An improved implementation might be to let the user of qtestlib decide which threshold he gives qSleep before warnings are printed. Or just a switch to turn this warning off entirely.