Added constants for time out

This commit is contained in:
Prianka Liz Kariat 2023-05-04 19:55:19 +05:30
parent 00712d727e
commit a4e11eac78

View File

@ -660,7 +660,9 @@ static NSString *const kLiveStreamTestsDictExpectationKey = @"expectation";
@"INVALID_ARGUMENT: Input timestamp must be monotonically increasing." @"INVALID_ARGUMENT: Input timestamp must be monotonically increasing."
}]; }];
AssertEqualErrors(error, expectedError); AssertEqualErrors(error, expectedError);
[self waitForExpectations:@[ expectation ] timeout:0.5f];
NSTimeInterval timeout = 0.5f;
[self waitForExpectations:@[ expectation ] timeout:timeout];
} }
- (void)testDetectWithLiveStreamModeSucceeds { - (void)testDetectWithLiveStreamModeSucceeds {
@ -707,7 +709,8 @@ static NSString *const kLiveStreamTestsDictExpectationKey = @"expectation";
XCTAssertTrue([objectDetector detectAsyncInImage:image timestampInMilliseconds:i error:nil]); XCTAssertTrue([objectDetector detectAsyncInImage:image timestampInMilliseconds:i error:nil]);
} }
[self waitForExpectations:@[ expectation ] timeout:0.5f]; NSTimeInterval timeout = 0.5f;
[self waitForExpectations:@[ expectation ] timeout:timeout];
} }
#pragma mark MPPObjectDetectorLiveStreamDelegate Methods #pragma mark MPPObjectDetectorLiveStreamDelegate Methods