From 4e692914ea95db25289c26832e3918cca312155c Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Sun, 15 Dec 2024 00:41:49 -0500 Subject: [PATCH] Add testHopeful for the NSURLSession related tests --- Tests/base/NSURLSession/simpleTaskTests.m | 4 +++- Tests/base/NSURLSession/uploadTaskTests.m | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Tests/base/NSURLSession/simpleTaskTests.m b/Tests/base/NSURLSession/simpleTaskTests.m index d3654093da..49e95a50d0 100644 --- a/Tests/base/NSURLSession/simpleTaskTests.m +++ b/Tests/base/NSURLSession/simpleTaskTests.m @@ -841,6 +841,7 @@ NSLog(@"Test Server: baseURL=%@", baseURL); + testHopeful = YES; [server setRoutes:createRoutes(routeClass, baseURL)]; [server resume]; @@ -873,6 +874,7 @@ [server suspend]; PASS(expectedCountOfTasksToComplete == currentCountOfCompletedTasks, "All transfers were completed before a timeout occurred"); + testHopeful = NO; [server release]; [countLock release]; @@ -887,4 +889,4 @@ return 0; } -#endif /* GS_HAVE_NSURLSESSION */ \ No newline at end of file +#endif /* GS_HAVE_NSURLSESSION */ diff --git a/Tests/base/NSURLSession/uploadTaskTests.m b/Tests/base/NSURLSession/uploadTaskTests.m index fe314e3e74..c49563916a 100644 --- a/Tests/base/NSURLSession/uploadTaskTests.m +++ b/Tests/base/NSURLSession/uploadTaskTests.m @@ -141,6 +141,7 @@ typedef void (^dataCompletionHandler)(NSData *data, NSURLResponse *response, Class httpServerClass; Class routeClass; + testHopeful = YES; fm = [NSFileManager defaultManager]; currentDirectory = [fm currentDirectoryPath]; helperPath = @@ -193,6 +194,7 @@ typedef void (^dataCompletionHandler)(NSData *data, NSURLResponse *response, [server release]; [countLock release]; + testHopeful = NO; } return 0; } @@ -205,4 +207,4 @@ typedef void (^dataCompletionHandler)(NSData *data, NSURLResponse *response, return 0; } -#endif \ No newline at end of file +#endif