You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I try to lookup a different api.github.com/users/briviere the test fails with the following within the APIClient.Serializer.decode actor:
test case:
final class APIClientIntegrationTests: XCTestCase {
var sut: APIClient!
override func setUp() {
super.setUp()
sut = APIClient(host: "api.github.com")
}
func testGitHubUsersApi() async throws {
let user = try await sut.send(Resources.users("briviere").get)
print(user)
XCTAssertEqual(user.login, "briviere")
}
}
Exception:
Printing description of data:
▿ 1282 bytes
count : 1282
▿ pointer : 0x00007f781283e200
pointerValue : 140153683436032
Printing description of self:
<Serializer: 0x600001e38af0>
2021-11-27 10:17:08.571713-0500 xctest[77569:5961128] NSInvalidUnarchiveOperationException attempting to serialize associated error of issue: This decoder will only decode classes that adopt NSSecureCoding. Class '__SwiftValue' does not adopt it.
:0: error: -[APIClientTests.APIClientIntegrationTests testGitHubUsersApi] : failed: caught error: "The data couldn’t be read because it is missing."
Test Case '-[APIClientTests.APIClientIntegrationTests testGitHubUsersApi]' failed (106.243 seconds).
Test Suite 'APIClientIntegrationTests' failed at 2021-11-27 10:17:08.573.
Executed 1 test, with 1 failure (1 unexpected) in 106.243 (106.244) seconds
Test Suite 'APIClientTests.xctest' failed at 2021-11-27 10:17:08.574.
Executed 1 test, with 1 failure (1 unexpected) in 106.243 (106.245) seconds
Test Suite 'Selected tests' failed at 2021-11-27 10:17:08.574.
Executed 1 test, with 1 failure (1 unexpected) in 106.243 (106.247) seconds
Program ended with exit code: 1
The text was updated successfully, but these errors were encountered:
Did you extend a User type in any way? I'm seeing a similar error when I attempt to decode Date without passing a decoding strategy. I'll provide a way to inject the strategy.
If I try to lookup a different api.github.com/users/briviere the test fails with the following within the APIClient.Serializer.decode actor:
test case:
final class APIClientIntegrationTests: XCTestCase {
var sut: APIClient!
}
Exception:
Printing description of data:
▿ 1282 bytes
▿ pointer : 0x00007f781283e200
Printing description of self:
<Serializer: 0x600001e38af0>
2021-11-27 10:17:08.571713-0500 xctest[77569:5961128] NSInvalidUnarchiveOperationException attempting to serialize associated error of issue: This decoder will only decode classes that adopt NSSecureCoding. Class '__SwiftValue' does not adopt it.
:0: error: -[APIClientTests.APIClientIntegrationTests testGitHubUsersApi] : failed: caught error: "The data couldn’t be read because it is missing."
Test Case '-[APIClientTests.APIClientIntegrationTests testGitHubUsersApi]' failed (106.243 seconds).
Test Suite 'APIClientIntegrationTests' failed at 2021-11-27 10:17:08.573.
Executed 1 test, with 1 failure (1 unexpected) in 106.243 (106.244) seconds
Test Suite 'APIClientTests.xctest' failed at 2021-11-27 10:17:08.574.
Executed 1 test, with 1 failure (1 unexpected) in 106.243 (106.245) seconds
Test Suite 'Selected tests' failed at 2021-11-27 10:17:08.574.
Executed 1 test, with 1 failure (1 unexpected) in 106.243 (106.247) seconds
Program ended with exit code: 1
The text was updated successfully, but these errors were encountered: