Polish comments for setKeepaliveWithInterval

pull/14781/head
Muxi Yan 7 years ago committed by Muxi Yan
parent 6d855c5f3c
commit a6ffad9725
  1. 8
      src/objective-c/GRPCClient/GRPCCall+ChannelArg.h
  2. 3
      src/objective-c/tests/InteropTests.m

@ -46,9 +46,11 @@ typedef NS_ENUM(NSInteger, GRPCCompressAlgorithm) {
+ (void)setDefaultCompressMethod:(GRPCCompressAlgorithm)algorithm
forhost:(nonnull NSString *)host;
/** Configure keepalive timeout parameters. A client ping after \a interval ms to check if the
* transport is still alive. After waiting for \a timeout ms, if the client does not receive the
* ping ack, it closes the transport. */
/** Enable keepalive and configure keepalive parameters. A user should call this function once to
* enable keepalive for a particular host. gRPC client sends a ping after every \a interval ms to
* check if the transport is still alive. After waiting for \a timeout ms, if the client does not
* receive the ping ack, it closes the transport; all pending calls to this host will fail with
* error GRPC_STATUS_INTERNAL with error information "keepalive watchdog timeout". */
+ (void)setKeepaliveWithInterval:(int)interval
timeout:(int)timeout
forHost:(nonnull NSString *)host;

@ -515,6 +515,9 @@ BOOL isRemoteInteropTest(NSString *host) {
} else {
// Keepalive should kick after 1s elapsed and fails the call.
XCTAssertNotNil(error);
XCTAssertEqual(error.code, GRPC_STATUS_INTERNAL);
XCTAssertEqualObjects(error.localizedDescription, @"keepalive watchdog timeout",
@"Unexpected failure that is not keepalive watchdog timeout.");
XCTAssertTrue(done);
[expectation fulfill];
}

Loading…
Cancel
Save