Fix flaky integration tests for the monitoring endpoint#10004
Conversation
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
cmacknz
left a comment
There was a problem hiding this comment.
Thank you! Addresses what was found in #9952 (comment)
We may find we need to relax newPolicyRevision := agent.PolicyRevision + 1 to just that the new revision is greater than the old one because we don't care about the specific revision. Regardless having the revision increment by one should be what happens, we just might be exposed to bugs in Fleet where it generates unnecessary revisions or some other update (from another test that isn't as isolated as it should be) causes an extra revision.
1c51244 to
2f5b10c
Compare
Ensure we verify the policy update was actually applied before querying the monitoring endpoint. Add a retry on said request as well.
2f5b10c to
f6a2d5c
Compare
|
|
Force merging, the actual tests changed here have passed multiple times and now we are waiting for Kubernetes tests. |
|
@Mergifyio backport 8.18 8.19 9.0 9.1 |
✅ Backports have been createdDetails
|
* Fix monitoring reloading tests Ensure we verify the policy update was actually applied before querying the monitoring endpoint. Add a retry on said request as well. * Use the explicit policy revision returned by Kibana (cherry picked from commit 5372f24)
* Fix monitoring reloading tests Ensure we verify the policy update was actually applied before querying the monitoring endpoint. Add a retry on said request as well. * Use the explicit policy revision returned by Kibana (cherry picked from commit 5372f24)
* Fix monitoring reloading tests Ensure we verify the policy update was actually applied before querying the monitoring endpoint. Add a retry on said request as well. * Use the explicit policy revision returned by Kibana (cherry picked from commit 5372f24)
* Fix monitoring reloading tests Ensure we verify the policy update was actually applied before querying the monitoring endpoint. Add a retry on said request as well. * Use the explicit policy revision returned by Kibana (cherry picked from commit 5372f24)
* Fix monitoring reloading tests Ensure we verify the policy update was actually applied before querying the monitoring endpoint. Add a retry on said request as well. * Use the explicit policy revision returned by Kibana
* Fix monitoring reloading tests Ensure we verify the policy update was actually applied before querying the monitoring endpoint. Add a retry on said request as well. * Use the explicit policy revision returned by Kibana (cherry picked from commit 5372f24)
* Fix monitoring reloading tests Ensure we verify the policy update was actually applied before querying the monitoring endpoint. Add a retry on said request as well. * Use the explicit policy revision returned by Kibana (cherry picked from commit 5372f24)
* Fix monitoring reloading tests Ensure we verify the policy update was actually applied before querying the monitoring endpoint. Add a retry on said request as well. * Use the explicit policy revision returned by Kibana (cherry picked from commit 5372f24)
* Fix monitoring reloading tests Ensure we verify the policy update was actually applied before querying the monitoring endpoint. Add a retry on said request as well. * Use the explicit policy revision returned by Kibana (cherry picked from commit 5372f24)
) * Fix monitoring reloading tests Ensure we verify the policy update was actually applied before querying the monitoring endpoint. Add a retry on said request as well. * Use the explicit policy revision returned by Kibana (cherry picked from commit 5372f24) Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
) * Fix monitoring reloading tests Ensure we verify the policy update was actually applied before querying the monitoring endpoint. Add a retry on said request as well. * Use the explicit policy revision returned by Kibana (cherry picked from commit 5372f24) Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
) * Fix monitoring reloading tests Ensure we verify the policy update was actually applied before querying the monitoring endpoint. Add a retry on said request as well. * Use the explicit policy revision returned by Kibana (cherry picked from commit 5372f24) Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
) * Fix monitoring reloading tests Ensure we verify the policy update was actually applied before querying the monitoring endpoint. Add a retry on said request as well. * Use the explicit policy revision returned by Kibana (cherry picked from commit 5372f24) Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
* Fix monitoring reloading tests Ensure we verify the policy update was actually applied before querying the monitoring endpoint. Add a retry on said request as well. * Use the explicit policy revision returned by Kibana





What does this PR do?
Improves the reliability of the monitoring reload tests and fixes an issue with the fipsonly tests related to testify assertion use. These failures originally surfaced in #9952, and I've also noticed it in #9903, but the fixes are generally applicable, so I'm applying them to all branches.
Why is it important?
Tests should be reliable.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added tests that prove my fix is effective or that my feature works[ ] I have added an entry in./changelog/fragmentsusing the changelog tool[ ] I have added an integration test or an E2E test