Browse Source

Fix availaibility in RPCError test (#1929)

George Barnett 1 year ago
parent
commit
f2ade1b6c9
1 changed files with 4 additions and 2 deletions
  1. 4 2
      Tests/GRPCCoreTests/RPCErrorTests.swift

+ 4 - 2
Tests/GRPCCoreTests/RPCErrorTests.swift

@@ -40,9 +40,11 @@ final class RPCErrorTests: XCTestCase {
     XCTAssertDescription(RPCError(code: .dataLoss, message: ""), #"dataLoss: """#)
     XCTAssertDescription(RPCError(code: .unknown, message: "message"), #"unknown: "message""#)
     XCTAssertDescription(RPCError(code: .aborted, message: "message"), #"aborted: "message""#)
+
+    struct TestError: Error {}
     XCTAssertDescription(
-      RPCError(code: .aborted, message: "message", cause: CancellationError()),
-      #"aborted: "message" (cause: "CancellationError()")"#
+      RPCError(code: .aborted, message: "message", cause: TestError()),
+      #"aborted: "message" (cause: "TestError()")"#
     )
   }