mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Capture and log AR debug logs on GitHub actions for flaky tests (#25048)
Why this change? We have been running into flaky tests which seems to be related to AR transaction problems. However, we are not able to reproduce this locally and do not have sufficient information on our builds now to debug the problem. What does this change do? Noe the following changes only applies when `ENV["GITHUB_ACTIONS"]` is present. This change introduces an RSpec around hook when `capture_log: true` has been set for a test. The responsibility of the hook is to capture the ActiveRecord debug logs and print them out.
This commit is contained in:
committed by
GitHub
parent
7852daa49b
commit
655c106101
@@ -20,6 +20,7 @@ module TurboTests
|
||||
run_duration_ms: @rspec_example.metadata[:run_duration_ms],
|
||||
process_pid: Process.pid,
|
||||
js_deprecations: @rspec_example.metadata[:js_deprecations],
|
||||
active_record_debug_logs: @rspec_example.metadata[:active_record_debug_logs],
|
||||
},
|
||||
location_rerun_argument: @rspec_example.location_rerun_argument,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user