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

fix(sms): stub Gatekeeper to prevent race condition #58687

Merged
merged 1 commit into from
May 21, 2024

Conversation

stephenliang
Copy link
Member

@stephenliang stephenliang commented May 16, 2024

The SMS controller uses Gatekeeper to enable/disable twilio sms. However, if a different test clears Gatekeeper after Gatekeeper was populated by this test, the test will fail. Instead, use a stub to prevent the cross-test state side effect.

Links

Testing story

Ran unit tests

Deployment strategy

Follow-up work

Privacy

Security

Caching

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

The SMS controller uses Gatekeeper to enable/disable twilio sms.
However, if a different test clears Gatekeeper after Gatekeeper was
populated by this test, the test will fail. Instead, use a stub to
prevent the cross-test state side effect.
Copy link
Contributor

@nicklathe nicklathe left a comment

Choose a reason for hiding this comment

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

This looks good to me 👍

@stephenliang stephenliang merged commit 89d9977 into staging May 21, 2024
2 checks passed
@stephenliang stephenliang deleted the stephen/fix-flaky-sms-test branch May 21, 2024 15:12
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.

None yet

2 participants