Add testHopeful for the NSURLSession related tests

This commit is contained in:
Gregory John Casamento 2024-12-15 00:41:49 -05:00
parent 3f27cb0d23
commit 4e692914ea
2 changed files with 6 additions and 2 deletions

View file

@ -841,6 +841,7 @@ main(int argc, char *argv[])
NSLog(@"Test Server: baseURL=%@", baseURL);
testHopeful = YES;
[server setRoutes:createRoutes(routeClass, baseURL)];
[server resume];
@ -873,6 +874,7 @@ main(int argc, char *argv[])
[server suspend];
PASS(expectedCountOfTasksToComplete == currentCountOfCompletedTasks,
"All transfers were completed before a timeout occurred");
testHopeful = NO;
[server release];
[countLock release];
@ -887,4 +889,4 @@ main(int argc, char *argv[])
return 0;
}
#endif /* GS_HAVE_NSURLSESSION */
#endif /* GS_HAVE_NSURLSESSION */

View file

@ -141,6 +141,7 @@ main(int argc, char *argv[])
Class httpServerClass;
Class routeClass;
testHopeful = YES;
fm = [NSFileManager defaultManager];
currentDirectory = [fm currentDirectoryPath];
helperPath =
@ -193,6 +194,7 @@ main(int argc, char *argv[])
[server release];
[countLock release];
testHopeful = NO;
}
return 0;
}
@ -205,4 +207,4 @@ main(int argc, char *argv[])
return 0;
}
#endif
#endif