Skip to content
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

Update api-cache test to be more stable when running quickly #10103

Merged
merged 3 commits into from
Jan 22, 2025

Conversation

aaemnnosttv
Copy link
Collaborator

@aaemnnosttv aaemnnosttv commented Jan 22, 2025

Summary

Addresses issue:

Relevant technical choices

This PR only addresses the one failure we are seeing in the changes to api-cache test where the time value was not greater than before. The change here ensures that even if the test runs the assertions within the same second that the latter value should always be greater than the first. If it fails again, then there may be a real issue with the cache or storage prefix.

Also modified a JS test to fix an unrelated instability. See /~https://github.com/google/site-kit-wp/actions/runs/12915141223/job/36016312697?pr=10103

PR Author Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 5.2 and PHP 7.4.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

Do not alter or remove anything below. The following sections will be managed by moderators only.

Code Reviewer Checklist

  • Run the code.
  • Ensure the acceptance criteria are satisfied.
  • Reassess the implementation with the IB.
  • Ensure no unrelated changes are included.
  • Ensure CI checks pass.
  • Check Storybook where applicable.
  • Ensure there is a QA Brief.
  • Ensure there are no unexpected significant changes to file sizes.

Merge Reviewer Checklist

  • Ensure the PR has the correct target branch.
  • Double-check that the PR is okay to be merged.
  • Ensure the corresponding issue has a ZenHub release assigned.
  • Add a changelog message to the issue.

const { result } = await renderHook( () => useDisplayCTAWidget(), {
registry,
} );
const { result, waitForRegistry } = await renderHook(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not related to E2E obviously but another instability which failed here that this should fix.

See /~https://github.com/google/site-kit-wp/actions/runs/12915141223/job/36016312697?pr=10103

@aaemnnosttv aaemnnosttv requested a review from tofumatt January 22, 2025 20:30
@tofumatt tofumatt merged commit ca36a8a into main Jan 22, 2025
15 checks passed
@tofumatt tofumatt deleted the fix/8229-e2e-tests branch January 22, 2025 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants