What does this PR do?
When rspec process is being killed by INT signal, it still runs the current test until the end.
If some resources (e.g. databases) are being decomissioned before the test ends, then datadog-ci traces this error and sends it to the backend. This might create noise for the users because of irrelevant errors.
This PR checks RSpec.world.wants_to_quit variable after running each test. If RSpec is quitting, we do not set error for the current span.
Motivation
Customer reports that datadog-ci reports test failures when infrastructure (db) is down after CI job is canceled .
What does this PR do? When rspec process is being killed by INT signal, it still runs the current test until the end. If some resources (e.g. databases) are being decomissioned before the test ends, then datadog-ci traces this error and sends it to the backend. This might create noise for the users because of irrelevant errors.
This PR checks
RSpec.world.wants_to_quit
variable after running each test. If RSpec is quitting, we do not set error for the current span.Motivation Customer reports that datadog-ci reports test failures when infrastructure (db) is down after CI job is canceled .
How to test the change? Unit test is provided