system-tests icon indicating copy to clipboard operation
system-tests copied to clipboard

Add wait conditions to check when setup is ready

Open smola opened this issue 2 years ago • 0 comments
trafficstars

Description

Replace setup sleep with precondition checks, which should generally be faster:

  • [x] Wait for traces: Issues a final request and waits until its trace is received. It is assumed that traces for previous request will have been received by the time the last trace is received.
  • [x] Wait for telemetry: Wait to receive 2 heartbeats after the last trace. This should be enough to have received metrics or other events generated by previous requests.
  • [x] Wait for remote config: Wait until the number of required remote config messages for each scenario have been received.
  • [x] Wait for DSM events (scenario: INTEGRATIONS)
  • [x] Wait for profiling events (scenario: PROFILING)
  • [x] Fallback timeouts
  • [x] Wait for OTel
  • [x] Wait for backend in E2E tests
  • [ ] Move most logic to wait_conditions.py
  • [ ] Make sure tests using /make_distant_call verify the secondary request, then make sure it's compatible with the wait conditions.
  • [ ] Add further documentation here about how all conditions work, how they relate to each other, and why they actually work.

Supersedes:

  • https://github.com/DataDog/system-tests/pull/1150

Related:

  • https://github.com/DataDog/system-tests/pull/1453
  • https://github.com/DataDog/system-tests/pull/1460

Motivation

Reviewer checklist

  • [x] If this PR modifies anything else than strictly the default scenario, then remove the run-default-scenario label
  • [ ] CI is green
    • [ ] If not, failing jobs are not related to this change (and you are 100% sure about this statement)

Workflow

  1. ⚠️⚠️ Create your PR as draft
  2. Follow the style guidelines of this project (See how to easily lint the code)
  3. Work on you PR until the CI passes (if something not related to your task is failing, you can ignore it)
  4. Mark it as ready for review

NOTE: By default in PR only default scenario tests will be launched. Remove the run-default-scenario label to run all scenarios (more info)

Once your PR is reviewed, you can merge it! :heart:

smola avatar Jun 26 '23 13:06 smola