Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add testHopeful for the NSURLSession related tests #478

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Tests/base/NSURLSession/simpleTaskTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,7 @@

NSLog(@"Test Server: baseURL=%@", baseURL);

testHopeful = YES;
[server setRoutes:createRoutes(routeClass, baseURL)];
[server resume];

Expand Down Expand Up @@ -873,6 +874,7 @@
[server suspend];
PASS(expectedCountOfTasksToComplete == currentCountOfCompletedTasks,
"All transfers were completed before a timeout occurred");
testHopeful = NO;

[server release];
[countLock release];
Expand All @@ -887,4 +889,4 @@
return 0;
}

#endif /* GS_HAVE_NSURLSESSION */
#endif /* GS_HAVE_NSURLSESSION */
4 changes: 3 additions & 1 deletion Tests/base/NSURLSession/uploadTaskTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ typedef void (^dataCompletionHandler)(NSData *data, NSURLResponse *response,
Class httpServerClass;
Class routeClass;

testHopeful = YES;
fm = [NSFileManager defaultManager];
currentDirectory = [fm currentDirectoryPath];
helperPath =
Expand Down Expand Up @@ -193,6 +194,7 @@ typedef void (^dataCompletionHandler)(NSData *data, NSURLResponse *response,

[server release];
[countLock release];
testHopeful = NO;
}
return 0;
}
Expand All @@ -205,4 +207,4 @@ typedef void (^dataCompletionHandler)(NSData *data, NSURLResponse *response,
return 0;
}

#endif
#endif
Loading