Fix token generation failure test flakiness#6136
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
WalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |



Goal
test_tokenGenerationFailsintermittently fails in CI. That's because the token generator used in the test app throws when the backend response is unsuccessful, but that's incorrect.TokenProvider.loadTokenis supposed to return an empty string if the token can't be generated.Implementation
Return empty string instead of throwing
🎨 UI Changes
None
Testing
Running
test_tokenGenerationFailsshould not failSummary by CodeRabbit