Next: , Previous: Looping Tests, Up: Advanced Features



4.7 Test Timeouts

To be certain that a test won't hang indefinitely, all tests are run with a timeout, the default being 3 seconds. If the test is not finished within that time, it is killed and logged as an error.

The timeout for a specific test case, which may contain multiple unit tests, can be changed with the tcase_set_timeout() function. The default timeout used for all test cases can be changed with the environment variable CK_DEFAULT_TIMEOUT, but this will not override an explicitly set timeout. All timeout arguments are in seconds and a timeout of 0 seconds turns off the timeout functionality.

Test timeouts are only available in CK_FORK mode.