Add comments to packet coalescing test

pull/9247/head
Muxi Yan 8 years ago
parent 8e6aec5ed7
commit 1fb35b5348
  1. 6
      src/objective-c/tests/InteropTests.m

@ -164,11 +164,15 @@
expectedResponse.payload.body = [NSMutableData dataWithLength:10];
XCTAssertEqualObjects(response, expectedResponse);
// The test is a success if there is a batch of exactly 3 ops (SEND_INITIAL_METADATA,
// SEND_MESSAGE, SEND_CLOSE_FROM_CLIENT). Without packet coalescing each batch of ops contains
// only one op.
NSArray *opBatches = [GRPCCall obtainAndCleanOpBatchLog];
const NSInteger kExpectedOpBatchSize = 3;
for (NSObject *o in opBatches) {
if ([o isKindOfClass:[NSArray class]]) {
NSArray *batch = (NSArray *)o;
if ([batch count] == 3) {
if ([batch count] == kExpectedOpBatchSize) {
[expectation fulfill];
break;
}

Loading…
Cancel
Save