-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implement FIRAppCheck
as a shim of GACAppCheck
#11721
Conversation
Apple API Diff ReportCommit: f514dac FirebaseAppCheckProtocolsFIRAppCheckProvider[ADDED] -getLimitedUseTokenWithCompletion:Swift:
+ optional func getLimitedUseToken () async throws -> FIRAppCheckToken
Objective-C:
+ - ( void ) getLimitedUseTokenWithCompletion : ( nonnull void ( ^ )( FIRAppCheckToken * _Nullable , NSError * _Nullable )) handler ; |
@@ -304,7 +218,8 @@ - (void)testGetToken_AppCheckProviderError { | |||
}]; | |||
|
|||
// 3. Wait for expectations and validate mocks. | |||
[self waitForExpectations:expectations timeout:0.5]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test and testInteropGetTokenForcingRefresh_Success
have been flaky (both locally and on CI). My hypothesis is that this is due to the inverted tokenNotification expectation which must wait the full duration of the timeout (since it's testing that a notification was not posted).
I've split these into two waits since we want to ensure that the tokenForcingRefresh
completion handler is invoked and then give a little time to ensure that no notification is posted after. Will see if this addresses the flakiness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't resolve the issue. Replaced tokenUpdateNotificationWithExpectedToken:isInverted:
with a new tokenUpdateNotificationNotPosted
to handle the isInverted = YES
case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you disable xcpretty for just these tests and spit the full xcodebuild logs into GHA? It's short enough that it's probably fine and it may contain a more complete failure reason. Right now it just says test failed but doesn't say why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done (and added back now). Thanks for the debugging help!
7bf4777
to
6ee192c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -1,231 +0,0 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving a note here for record keeping: These tests were removed because they enqueue async token fetch tasks that are run when other tests use waitForExpectations
, causing test failures in other test targets. They can be reinstated if necessary, but have been replaced with E2E tests.
FIRAppCheck.m
as a shim ofGACAppCheck
FIRAppCheck.m
getLimitedUseTokenWithCompletion:
toFIRAppCheckProvider
protocol#no-changelog