diff options
author | 2018-10-18 17:04:03 -0700 | |
---|---|---|
committer | 2018-10-18 17:04:03 -0700 | |
commit | 4264ea2b55f46c1904fc179fb0db7b733b8c3e4b (patch) | |
tree | f0894f19b96ae1d8b3c120646b7df47c016b22b7 /src/objective-c/tests/ChannelTests/ChannelPoolTest.m | |
parent | 6ae2ea643d89f7b2e7839f9016a61361ce92b5d5 (diff) |
clang-format
Diffstat (limited to 'src/objective-c/tests/ChannelTests/ChannelPoolTest.m')
-rw-r--r-- | src/objective-c/tests/ChannelTests/ChannelPoolTest.m | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/src/objective-c/tests/ChannelTests/ChannelPoolTest.m b/src/objective-c/tests/ChannelTests/ChannelPoolTest.m index db64ac6339..f4a9fb4a2c 100644 --- a/src/objective-c/tests/ChannelTests/ChannelPoolTest.m +++ b/src/objective-c/tests/ChannelTests/ChannelPoolTest.m @@ -57,11 +57,9 @@ NSString *kDummyHost = @"dummy.host"; GRPCChannelConfiguration *config1 = [[GRPCChannelConfiguration alloc] initWithHost:kDummyHost callOptions:options1]; GRPCChannelPool *pool = [[GRPCChannelPool alloc] init]; - GRPCChannel *channel1 = - [pool channelWithConfiguration:config1]; + GRPCChannel *channel1 = [pool channelWithConfiguration:config1]; [pool removeChannel:channel1]; - GRPCChannel *channel2 = - [pool channelWithConfiguration:config1]; + GRPCChannel *channel2 = [pool channelWithConfiguration:config1]; XCTAssertNotEqual(channel1, channel2); } @@ -74,18 +72,14 @@ extern NSTimeInterval kChannelDestroyDelay; options1.transportType = GRPCTransportTypeInsecure; GRPCChannelConfiguration *config1 = [[GRPCChannelConfiguration alloc] initWithHost:kDummyHost callOptions:options1]; - GRPCChannelPool *pool = - [[GRPCChannelPool alloc] init]; - GRPCChannel *channel1 = - [pool channelWithConfiguration:config1]; + GRPCChannelPool *pool = [[GRPCChannelPool alloc] init]; + GRPCChannel *channel1 = [pool channelWithConfiguration:config1]; [channel1 unmanagedCallUnref]; sleep(1); - GRPCChannel *channel2 = - [pool channelWithConfiguration:config1]; + GRPCChannel *channel2 = [pool channelWithConfiguration:config1]; XCTAssertEqual(channel1, channel2); sleep((int)kChannelDestroyDelay + 2); - GRPCChannel *channel3 = - [pool channelWithConfiguration:config1]; + GRPCChannel *channel3 = [pool channelWithConfiguration:config1]; XCTAssertEqual(channel1, channel3); kChannelDestroyDelay = kOriginalInterval; } @@ -96,12 +90,11 @@ extern NSTimeInterval kChannelDestroyDelay; options1.transportType = GRPCTransportTypeInsecure; GRPCCallOptions *options2 = [options1 copy]; GRPCChannelConfiguration *config1 = - [[GRPCChannelConfiguration alloc] initWithHost:kDummyHost callOptions:options1]; + [[GRPCChannelConfiguration alloc] initWithHost:kDummyHost callOptions:options1]; GRPCChannelConfiguration *config2 = - [[GRPCChannelConfiguration alloc] initWithHost:kDummyHost callOptions:options2]; + [[GRPCChannelConfiguration alloc] initWithHost:kDummyHost callOptions:options2]; GRPCChannelPool *pool = [[GRPCChannelPool alloc] init]; - GRPCChannel *channel1 = [pool channelWithConfiguration:config1]; [pool removeAndCloseAllChannels]; GRPCChannel *channel2 = [pool channelWithConfiguration:config2]; @@ -119,17 +112,13 @@ extern NSTimeInterval kChannelDestroyDelay; [[GRPCChannelConfiguration alloc] initWithHost:kDummyHost callOptions:options2]; GRPCChannelPool *pool = [[GRPCChannelPool alloc] init]; - GRPCChannel *channel1 = - [pool channelWithConfiguration:config1]; - GRPCChannel *channel2 = - [pool channelWithConfiguration:config2]; + GRPCChannel *channel1 = [pool channelWithConfiguration:config1]; + GRPCChannel *channel2 = [pool channelWithConfiguration:config2]; XCTAssertNotEqual(channel1, channel2); [pool removeAndCloseAllChannels]; - GRPCChannel *channel3 = - [pool channelWithConfiguration:config1]; - GRPCChannel *channel4 = - [pool channelWithConfiguration:config2]; + GRPCChannel *channel3 = [pool channelWithConfiguration:config1]; + GRPCChannel *channel4 = [pool channelWithConfiguration:config2]; XCTAssertNotEqual(channel1, channel3); XCTAssertNotEqual(channel2, channel4); } |