One of the test cases in my test suite triggered a bug in my program which caused it to enter into an infinite loop. This bug also causes the program to consume an unbounded amount of memory so my system quickly starts swapping to disk and becomes very unresponsive.
Is there some way to make my test suite kill tests that are taking way too long to run and/or are consuming too much memory? I would prefer if the test suite failed these buggy test cases with a "taking too long" error instead of of letting them run out of control.
Is there something I can do with Busted to prevent the test suite from getting stuck in these cases. I would prefer to fail this test case with a "took too long to return" error than t
If you are using luajit with busted you can use the native luajit time library. http://scilua.org/time.html