Skip to content

Commit e210e19

Browse files
authored
Improve the names of a few commonly used APIs (#2014)
Motivation: Naming is important; it should be clear and concise. Modifications: The follow renames all offer more precise names: - Rename `server.run()` to `server.serve()` - Rename `server.stopListening()` to `server.beginGracefulShutdown()` - Rename `client.close()` to `client.beginGracefulShutdown()` Result: Clearer APIs
1 parent f396aeb commit e210e19

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Tests/InProcessInteroperabilityTests/InProcessInteroperabilityTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class InProcessInteroperabilityTests: XCTestCase {
2929
try await withThrowingTaskGroup(of: Void.self) { group in
3030
group.addTask {
3131
let server = GRPCServer(transport: inProcess.server, services: [TestService()])
32-
try await server.run()
32+
try await server.serve()
3333
}
3434

3535
group.addTask {

Tests/Services/HealthTests/HealthTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ final class HealthTests: XCTestCase {
3131

3232
try await withThrowingDiscardingTaskGroup { group in
3333
group.addTask {
34-
try await server.run()
34+
try await server.serve()
3535
}
3636

3737
group.addTask {

0 commit comments

Comments
 (0)