Skip to content

Commit 435c703

Browse files
committed
Add the missing expectations fullfil.
1 parent 65c52d2 commit 435c703

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

FirebasePerformance/Tests/Unit/Timer/FIRTraceTest.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,16 +475,17 @@ - (void)testBackgroundStateAfterTraceStop {
475475
object:[UIApplication sharedApplication]];
476476
[defaultCenter postNotificationName:UIApplicationDidBecomeActiveNotification
477477
object:[UIApplication sharedApplication]];
478+
[expectation fulfill];
478479
});
479480

480481
[self waitForExpectationsWithTimeout:5.0
481482
handler:^(NSError *_Nullable error) {
482483
if (error) {
483484
XCTFail(@"Expectation failed with error: %@", error);
484485
} else {
486+
[trace stop];
485487
XCTAssertEqual(trace.backgroundTraceState,
486488
FPRTraceStateBackgroundAndForeground);
487-
[trace stop];
488489
}
489490
}];
490491
}

0 commit comments

Comments
 (0)