Skip to content

Commit

Permalink
Restoring the first delay in the test
Browse files Browse the repository at this point in the history
  • Loading branch information
mbruin-NR committed Oct 24, 2024
1 parent c418948 commit abfeddf
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tests/Unit-Tests/NewRelicAgentTests/Uncategorized/NRLoggerTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,18 @@ - (void) testAutoCollectedLogs {
[NRLogger setRemoteLogLevel:NRLogLevelDebug];
[NRAutoLogCollector redirectStandardOutputAndError];

XCTestExpectation *delayExpectation1 = [self expectationWithDescription:@"Waiting for Log Queue"];

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[delayExpectation1 fulfill];
});

[self waitForExpectationsWithTimeout:5 handler:^(NSError * _Nullable error) {
if (error) {
XCTFail(@"Timeout error");
}
}];

// Three messages should reach the remote log file for upload.
NSLog(@"NSLog Test \n\n");
os_log_t customLog = os_log_create("com.agent.tests", "logTest");
Expand Down

0 comments on commit abfeddf

Please sign in to comment.