Skip to content
This repository was archived by the owner on Sep 30, 2025. It is now read-only.
Merged
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
2 changes: 1 addition & 1 deletion Sources/SPTDataLoader/SPTDataLoaderResponse.m
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ - (BOOL)shouldRetry
case SPTDataLoaderResponseHTTPStatusCodeExpectationFail:
case SPTDataLoaderResponseHTTPStatusCodeHTTPVersionNotSupported:
case SPTDataLoaderResponseHTTPStatusCodeNotImplemented:
return NO;
case SPTDataLoaderResponseHTTPStatusCodeNotFound:
return NO;
case SPTDataLoaderResponseHTTPStatusCodeRequestTimeout:
case SPTDataLoaderResponseHTTPStatusCodeUnsupportedMediaTypes:
case SPTDataLoaderResponseHTTPStatusCodeInternalServerError:
Expand Down
2 changes: 1 addition & 1 deletion Tests/SPTDataLoader/SPTDataLoaderRequestTaskHandlerTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ - (void)testRetry
[self.handler receiveResponse:httpResponse];
[self.handler completeWithError:nil];
XCTAssertEqual(self.requestResponseHandler.numberOfSuccessfulDataResponseCalls, 0u, @"The handler did relay a successful response onto its request response handler when it should have silently retried");
XCTAssertEqual(self.requestResponseHandler.numberOfFailedResponseCalls, 0u, @"The handler did relay a failed response onto its request response handler when it should have silently retried");
XCTAssertEqual(self.requestResponseHandler.numberOfFailedResponseCalls, 1u, @"The handler did not relay a failed response onto its request response handler for a 404 status code");
}

- (void)testRetryWithResponseBody
Expand Down
2 changes: 1 addition & 1 deletion Tests/SPTDataLoader/SPTDataLoaderResponseTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ - (void)testShouldRetryWithNotFoundHTTPStatusCode
headerFields:nil];
self.response = [SPTDataLoaderResponse dataLoaderResponseWithRequest:self.request response:self.urlResponse];
BOOL shouldRetry = [self.response shouldRetry];
XCTAssertTrue(shouldRetry, @"The response should retry when given the HTTP status code of Not Found");
XCTAssertFalse(shouldRetry, @"The response should not retry when given the HTTP status code of Not Found");
}

- (void)testShouldRetryForCertificateRejection
Expand Down
Loading