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

Wait for client-side stats in resource renaming test

Open VianneyRuhlmann opened this issue 2 weeks ago • 1 comments
trafficstars

Motivation

Client-side stats needs to receive some information from the agent (calling the /info endpoint) before being enabled. In the meantime we fallback on the agent stats computation. To make sure the test run correctly on stats computation we need to wait for the stats-computation to be fully enabled before sending the requests we're going to check for in stats payload.

Changes

We introduce 2 waiting mechanisms: 1 - We wait for some stats payload to be received by the agent (we can rely on healthchecks for some requests to be fired regularly). This makes all future requests will be included in client-side stats. 2 - Once we sent the test requests, we wait for the tracer to flush the stats (by default every 10 secs) to make sure the agent received the stats.

Note

I'm not sure the setup function is the best way to include this waiting mechanism. I'm happy to discuss better/ more reusable ways to implement this in the system-tests.

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

:rocket: Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • [ ] If PR title starts with [<language>], double-check that only <language> is impacted by the change
  • [ ] No system-tests internal is modified. Otherwise, I have the approval from R&P team
  • [ ] A docker base image is modified?
    • [ ] the relevant build-XXX-image label is present
  • [ ] A scenario is added (or removed)?

VianneyRuhlmann avatar Nov 05 '25 10:11 VianneyRuhlmann