mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 22:53:43 +08:00
0478b45fd3
Why this change? We have been seeing specs time out on GitHub CI but the problem is that we are unable to debug those timeouts due to a lack of information. This change seeks to print out the backtraces of all threads right before a spec times out on CI. What does this change do? 1. Starts a thread on CI which will wait for a spec to start running. 1. Once a spec starts running, the thread will sleep for `PER_SPEC_TIMEOUT_SECONDS -1` seconds. 1. After sleeping, the thread checks if the spec is still running and prints out the backtraces of all threads if it is. Otherwise, the thread does nothing and runs the next loop. 1. At the end of each spec run, we ensure that the thread is in a waiting state for the next spec run to start. Note that there is no need for us to teardown or cleanup the thread since the process terminates after running all the tests. |
||
---|---|---|
.. | ||
fabricators | ||
fixtures | ||
generator | ||
helpers | ||
import_export | ||
initializers | ||
integration | ||
integrity | ||
jobs | ||
lib | ||
mailers | ||
migrations | ||
models | ||
multisite | ||
requests | ||
script/import_scripts | ||
serializers | ||
services | ||
support | ||
system | ||
tasks | ||
views | ||
rails_helper.rb | ||
regenerate_swagger_docs | ||
swagger_helper.rb |