Skip to content

Update GIDSignInTest to correctly setUp and tearDown NSUserDefaults #527

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 10, 2025

Conversation

camden-king
Copy link
Contributor

NSUserDefaults have not behaving as expected in the GIDSignInTests. Making the GIDSignInTests flaky. Based on my investigation I found the following:

  1. We were setting suite name after we wrote to the default suite (340)
  2. We were only setting the suite name on iOS (346)
  3. We were not properly cleaning up the NSUserDefaults (375). We should be doing [_testUserDefaults removePersistentDomainForName:kUserDefaultsSuiteName] during cleanup
    This PR correct the behaviors outlined above.

@camden-king camden-king marked this pull request as ready for review June 5, 2025 22:47
@brnnmrls brnnmrls self-requested a review June 10, 2025 16:36
@camden-king camden-king merged commit 6f340a9 into main Jun 10, 2025
19 of 20 checks passed
@camden-king camden-king deleted the camden-king/fix-NSUserDefault-in-GIDSignInTests branch June 10, 2025 17:34
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