We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cae05f commit 4fe2314Copy full SHA for 4fe2314
UnitTests/GTLRServiceTest.m
@@ -835,7 +835,12 @@ - (void)testService_SingleQuery_Paging {
835
service.fetcherService.testBlock = ^(GTMSessionFetcher *fetcherToTest,
836
GTMSessionFetcherTestResponse testResponse) {
837
checkRequestParamsAndHeaders(fetcherToTest.request);
838
- XCTAssertEqual(queryTicket.pagesFetchedCounter, (NSUInteger)pageCounter);
+ // There's a chance the test block will get calls at the same time as the query is being
839
+ // started, so there could a a race for access to `queryTicket`, so skip inspecing it
840
+ // for the first page.
841
+ if (pageCounter != 0) {
842
+ XCTAssertEqual(queryTicket.pagesFetchedCounter, (NSUInteger)pageCounter);
843
+ }
844
845
++pageCounter;
846
0 commit comments