system-tests
system-tests copied to clipboard
Wait for client-side stats in resource renaming test
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
- ⚠️ Create your PR as draft ⚠️
- Work on you PR until the CI passes
- 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!
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-imagelabel is present
- [ ] the relevant
- [ ] A scenario is added (or removed)?
- [ ] Get a review from R&P team