[Infra] Fix hanging tests
Merged
MA
3mo ago+619+619+012345678901234567890123456789-356-356-012345678901234567890123456789
Changes
- Fix OTLP transmission handlers not being disposed, which could keep threads alive in the background and cause the coverage collection to never complete and hang the test host.
- Fix undisposed resources if logger, meter or tracer provider threw an exception in its constructor, which would also keep coverage collection alive in CI from tests that tested throwing behaviours.
- Fix race condition that could cause the Prometheus scrape endpoint to report HTTP 200 instead of 408 under load.
- Fix a flaky HTTP retry test.
- Fix CI being treated as successful if a job timed-out and was cancelled.
- Increase
VSTEST_CONNECTION_TIMEOUTto allow for additional time required to instrument the GAC for code coverage when targetingnet462. - Exclude test loggers from code coverage as they could cause the VSTest process to hang.
- Add a timeout to test container start-up and dispose.
- Remove redundant port binding.
- Do not wait indefinitely for Prometheus test container logs.
- Collect hang dumps from tests.
- Add a timeout to the test step and the test session.
Merge requirement checklist
- CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
- Unit tests added/updated
- Appropriate
CHANGELOG.mdfiles updated for non-trivial changes - Changes in public API reviewed (if applicable)