Skip to content

[8.19] (backport #8374) fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault #8394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jun 9, 2025

What does this PR do?

This PR addresses increases the test context timeout from 5s to 20s of Test_checkForUnprivilegedVault to accommodate for slower machines, such as Mac CI runners, and to avoid intermittent failures due to timing out while trying to acquire a file lock.

Why is it important?

The test Test_checkForUnprivilegedVault/file_vault_exists_but_it's_unreadable_-_return_error was observed to fail intermittently on slower environments (e.g., Mac runners) due to context deadline exceeded errors when attempting to acquire a file lock. These failures were not related to the actual logic being tested, but rather to insufficient timeout settings. Increasing the timeout ensures test stability across environments. In addition, updating the deprecated logp.NewInMemory call eliminates static analysis warnings.

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

Disruptive User Impact

None. This change only affects a unit test and does not impact production behavior or configurations.

How to test this PR locally

mage unitTest

Related issues

…est_checkForUnprivilegedVault (#8374)

* fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault

* fix: SA1019 logp.NewInMemory is deprecated

(cherry picked from commit 738cc40)
@mergify mergify bot requested a review from a team as a code owner June 9, 2025 05:24
@mergify mergify bot added the backport label Jun 9, 2025
@mergify mergify bot requested review from pkoutsovasilis and michel-laterman and removed request for a team June 9, 2025 05:24
@mergify mergify bot added the backport label Jun 9, 2025
@github-actions github-actions bot added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team skip-changelog labels Jun 9, 2025
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

Copy link
Contributor Author

mergify bot commented Jun 9, 2025

This pull request has not been merged yet. Could you please review and merge it @pkoutsovasilis? 🙏

Copy link

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @pkoutsovasilis

@pkoutsovasilis pkoutsovasilis merged commit 92d8c1c into 8.19 Jun 9, 2025
14 checks passed
@pkoutsovasilis pkoutsovasilis deleted the mergify/bp/8.19/pr-8374 branch June 9, 2025 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants