From 435c703732dcb5b8989bc719be0868503e4a2ec8 Mon Sep 17 00:00:00 2001 From: Viswanathan Munisamy Date: Wed, 13 Nov 2024 15:52:59 -0800 Subject: [PATCH] Add the missing expectations fullfil. --- FirebasePerformance/Tests/Unit/Timer/FIRTraceTest.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FirebasePerformance/Tests/Unit/Timer/FIRTraceTest.m b/FirebasePerformance/Tests/Unit/Timer/FIRTraceTest.m index 6a9e393cf6d..39a389fdb3b 100644 --- a/FirebasePerformance/Tests/Unit/Timer/FIRTraceTest.m +++ b/FirebasePerformance/Tests/Unit/Timer/FIRTraceTest.m @@ -475,6 +475,7 @@ - (void)testBackgroundStateAfterTraceStop { object:[UIApplication sharedApplication]]; [defaultCenter postNotificationName:UIApplicationDidBecomeActiveNotification object:[UIApplication sharedApplication]]; + [expectation fulfill]; }); [self waitForExpectationsWithTimeout:5.0 @@ -482,9 +483,9 @@ - (void)testBackgroundStateAfterTraceStop { if (error) { XCTFail(@"Expectation failed with error: %@", error); } else { + [trace stop]; XCTAssertEqual(trace.backgroundTraceState, FPRTraceStateBackgroundAndForeground); - [trace stop]; } }]; }