Browse Source

Fix the tests.

Daniel Alm 7 years ago
parent
commit
55328b5bce
1 changed files with 9 additions and 9 deletions
  1. 9 9
      Tests/gRPCTests/GRPCTests.swift

+ 9 - 9
Tests/gRPCTests/GRPCTests.swift

@@ -68,7 +68,7 @@ func runTest(useSSL: Bool) {
   let serverRunningSemaphore = DispatchSemaphore(value: 0)
 
   // create the server
-  var server: gRPC.Server!
+  var server: Server!
   if useSSL {
     let certificateURL = URL(fileURLWithPath: "Tests/ssl.crt")
     let keyURL = URL(fileURLWithPath: "Tests/ssl.key")
@@ -78,11 +78,11 @@ func runTest(useSSL: Bool) {
     else {
       return
     }
-    server = gRPC.Server(address: address,
-                         key: key,
-                         certs: certificate)
+    server = Server(address: address,
+                    key: key,
+                    certs: certificate)
   } else {
-    server = gRPC.Server(address: address)
+    server = Server(address: address)
   }
 
   // start the server
@@ -120,7 +120,7 @@ func verify_metadata(_ metadata: Metadata, expected: [String: String]) {
 
 func runClient(useSSL: Bool) throws {
   let message = clientText.data(using: .utf8)
-  var channel: gRPC.Channel!
+  var channel: Channel!
 
   if useSSL {
     let certificateURL = URL(fileURLWithPath: "Tests/ssl.crt")
@@ -130,9 +130,9 @@ func runClient(useSSL: Bool) throws {
       return
     }
     let host = "example.com"
-    channel = gRPC.Channel(address: address, certificates: certificates, host: host)
+    channel = Channel(address: address, certificates: certificates, host: host)
   } else {
-    channel = gRPC.Channel(address: address, secure: false)
+    channel = Channel(address: address, secure: false)
   }
 
   channel.host = host
@@ -164,7 +164,7 @@ func runClient(useSSL: Bool) throws {
   }
 }
 
-func runServer(server: gRPC.Server) throws {
+func runServer(server: Server) throws {
   var requestCount = 0
   let sem = DispatchSemaphore(value: 0)
   server.run { requestHandler in