Skip to content

Commit

Permalink
Add the missing expectations fullfil.
Browse files Browse the repository at this point in the history
  • Loading branch information
visumickey committed Nov 13, 2024
1 parent 65c52d2 commit 435c703
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion FirebasePerformance/Tests/Unit/Timer/FIRTraceTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -475,16 +475,17 @@ - (void)testBackgroundStateAfterTraceStop {
object:[UIApplication sharedApplication]];
[defaultCenter postNotificationName:UIApplicationDidBecomeActiveNotification
object:[UIApplication sharedApplication]];
[expectation fulfill];
});

[self waitForExpectationsWithTimeout:5.0
handler:^(NSError *_Nullable error) {
if (error) {
XCTFail(@"Expectation failed with error: %@", error);
} else {
[trace stop];
XCTAssertEqual(trace.backgroundTraceState,
FPRTraceStateBackgroundAndForeground);
[trace stop];
}
}];
}
Expand Down

0 comments on commit 435c703

Please sign in to comment.