Skip to content

Conversation

@mauri870
Copy link
Member

@mauri870 mauri870 commented Dec 1, 2025

What does this PR do?

Updates TestContainerCMDAgentMonitoringRuntimeExperimental to use the assert.CollectT instead of the testing.T inside require.EventuallyWithT.

Why is it important?

Prevents the code from failing on the first pass of require.EventuallyWithT. Now it retries transient assertion errors up to the timeout.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • 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/fragments using the changelog tool
  • I have added an integration test or an E2E test

Related issues

@mauri870 mauri870 self-assigned this Dec 1, 2025
@mauri870 mauri870 added Cleanup skip-changelog backport-active-all Automated backport with mergify to all the active branches labels Dec 1, 2025
@mauri870 mauri870 marked this pull request as ready for review December 1, 2025 13:02
@mauri870 mauri870 requested a review from a team as a code owner December 1, 2025 13:02
swiatekm
swiatekm previously approved these changes Dec 1, 2025
Copy link
Contributor

@swiatekm swiatekm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the outer testing fixture instead of the inner one in a testify assertion is slowly becoming a modern classic for test flakiness.

@mauri870
Copy link
Member Author

mauri870 commented Dec 1, 2025

/test

@mauri870 mauri870 enabled auto-merge (squash) December 1, 2025 14:31
@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 1, 2025

⏳ Build in-progress, with failures

Failed CI Steps

History

cc @mauri870

@mauri870 mauri870 requested a review from swiatekm December 1, 2025 18:39
@mauri870 mauri870 merged commit f32807c into elastic:main Dec 1, 2025
21 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

@Mergifyio backport 8.19 9.1 9.2

@mergify
Copy link
Contributor

mergify bot commented Dec 1, 2025

mergify bot pushed a commit that referenced this pull request Dec 1, 2025
…timeExperimental (#11499)

Updates TestContainerCMDAgentMonitoringRuntimeExperimental to use the assert.CollectT instead of the testing.T inside require.EventuallyWithT.

This prevents the code from failing on the first pass of require.EventuallyWithT. Now it retries transient assertion errors up to the timeout.

(cherry picked from commit f32807c)
mergify bot pushed a commit that referenced this pull request Dec 1, 2025
…timeExperimental (#11499)

Updates TestContainerCMDAgentMonitoringRuntimeExperimental to use the assert.CollectT instead of the testing.T inside require.EventuallyWithT.

This prevents the code from failing on the first pass of require.EventuallyWithT. Now it retries transient assertion errors up to the timeout.

(cherry picked from commit f32807c)
mergify bot pushed a commit that referenced this pull request Dec 1, 2025
…timeExperimental (#11499)

Updates TestContainerCMDAgentMonitoringRuntimeExperimental to use the assert.CollectT instead of the testing.T inside require.EventuallyWithT.

This prevents the code from failing on the first pass of require.EventuallyWithT. Now it retries transient assertion errors up to the timeout.

(cherry picked from commit f32807c)
pierrehilbert pushed a commit that referenced this pull request Dec 2, 2025
…timeExperimental (#11499) (#11510)

Updates TestContainerCMDAgentMonitoringRuntimeExperimental to use the assert.CollectT instead of the testing.T inside require.EventuallyWithT.

This prevents the code from failing on the first pass of require.EventuallyWithT. Now it retries transient assertion errors up to the timeout.

(cherry picked from commit f32807c)

Co-authored-by: Mauri de Souza Meneguzzo <[email protected]>
pierrehilbert pushed a commit that referenced this pull request Dec 2, 2025
…timeExperimental (#11499) (#11509)

Updates TestContainerCMDAgentMonitoringRuntimeExperimental to use the assert.CollectT instead of the testing.T inside require.EventuallyWithT.

This prevents the code from failing on the first pass of require.EventuallyWithT. Now it retries transient assertion errors up to the timeout.

(cherry picked from commit f32807c)

Co-authored-by: Mauri de Souza Meneguzzo <[email protected]>
mauri870 added a commit that referenced this pull request Dec 3, 2025
…timeExperimental (#11499) (#11511)

Updates TestContainerCMDAgentMonitoringRuntimeExperimental to use the assert.CollectT instead of the testing.T inside require.EventuallyWithT.

This prevents the code from failing on the first pass of require.EventuallyWithT. Now it retries transient assertion errors up to the timeout.

(cherry picked from commit f32807c)

Co-authored-by: Mauri de Souza Meneguzzo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-all Automated backport with mergify to all the active branches Cleanup skip-changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants