Auto-tools/Projects/Stockwell/Timeouts

From MozillaWiki
Jump to: navigation, search

Test Timeouts

This test exceeded the timeout threshold. It should be rewritten or split up. If that's not possible, use requestLongerTimeout(N), but only as a last resort.

This error message indicates that the test took too long to execute.

Broadly speaking, there are two possible causes:

  • the test was not progressing at the time it failed: the test was hung;
  • the test was progressing at the time it failed, it just needed more time: the test is a long-running test.

If the test was hung, the cause of the hang needs to be determined and addressed.

If the test is a long-running test, there are several remedies:

  • Simplify the test so that it completes execution faster. Perhaps parts of the test are redundant? Is each sub-test necessary and useful?
  • Optimize the test so that it completes execution faster.
  • Split the test into two or more separate tests, each of which completes faster. In most cases, this is a simple and effective solution. Sometimes there is common code required by each of the new tests; try to factor it out into a shared file, or duplicate it if absolutely necessary.
  • Call requestLongerTimeout(n) to allow the test to run n-times longer without failing due to timeout.

application timed out after N seconds with no output

Test timed out

Task timeout after N seconds

The taskcluster task has exceeded the maximum run time configured for the task. Typically maximum run times (values of "N") are 3600, 5400, or 7200 seconds.

Broadly speaking, there are two possible causes:

  • the task was not progressing at the time it failed: the task was hung;
  • the task was progressing at the time it failed, it just needed more time: the task is a long-running task.

If the task was hung, the cause of the hang needs to be determined and addressed. Most test harnesses have a timeout; if the harness times out, the task will end before it times out. If the test harness failed to time out, that should be investigated.

Possible remedies for a long-running task:

  • Increase the number of "chunks" for the test suite, so that the work is distributed over more tasks, and each task runs within the existing maximum run time.
  • Increase the task's "max-run-time", so that the task can run longer without exceeding the maximum run time.

For most test tasks, the typical run time should not be more than 30 minutes, so that test results are available in a timely manner. Maximum run time should allow for random variation in run times,