Merge github.com:grpc/grpc into openssl-just-needs-to-build

pull/3054/head
Craig Tiller 10 years ago
commit 352312cb73
  1. 6
      BUILD
  2. 2
      build.json
  3. 4
      gRPC.podspec
  4. 62
      src/objective-c/tests/GRPCClientTests.m
  5. 2
      tools/doxygen/Doxyfile.core.internal
  6. 8
      tools/run_tests/sources_and_headers.json
  7. 2
      vsprojects/grpc/grpc.vcxproj
  8. 9
      vsprojects/grpc/grpc.vcxproj.filters
  9. 2
      vsprojects/grpc_unsecure/grpc_unsecure.vcxproj
  10. 9
      vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters

@ -209,6 +209,8 @@ cc_library(
"src/core/json/json_writer.h",
"src/core/profiling/timers.h",
"src/core/profiling/timers_preciseclock.h",
"src/core/statistics/census_interface.h",
"src/core/statistics/census_rpc_stats.h",
"src/core/surface/byte_buffer_queue.h",
"src/core/surface/call.h",
"src/core/surface/channel.h",
@ -476,6 +478,8 @@ cc_library(
"src/core/json/json_writer.h",
"src/core/profiling/timers.h",
"src/core/profiling/timers_preciseclock.h",
"src/core/statistics/census_interface.h",
"src/core/statistics/census_rpc_stats.h",
"src/core/surface/byte_buffer_queue.h",
"src/core/surface/call.h",
"src/core/surface/channel.h",
@ -1229,6 +1233,8 @@ objc_library(
"src/core/json/json_writer.h",
"src/core/profiling/timers.h",
"src/core/profiling/timers_preciseclock.h",
"src/core/statistics/census_interface.h",
"src/core/statistics/census_rpc_stats.h",
"src/core/surface/byte_buffer_queue.h",
"src/core/surface/call.h",
"src/core/surface/channel.h",

@ -182,6 +182,8 @@
"src/core/json/json_writer.h",
"src/core/profiling/timers.h",
"src/core/profiling/timers_preciseclock.h",
"src/core/statistics/census_interface.h",
"src/core/statistics/census_rpc_stats.h",
"src/core/surface/byte_buffer_queue.h",
"src/core/surface/call.h",
"src/core/surface/channel.h",

@ -211,6 +211,8 @@ Pod::Spec.new do |s|
'src/core/json/json_writer.h',
'src/core/profiling/timers.h',
'src/core/profiling/timers_preciseclock.h',
'src/core/statistics/census_interface.h',
'src/core/statistics/census_rpc_stats.h',
'src/core/surface/byte_buffer_queue.h',
'src/core/surface/call.h',
'src/core/surface/channel.h',
@ -481,6 +483,8 @@ Pod::Spec.new do |s|
'src/core/json/json_writer.h',
'src/core/profiling/timers.h',
'src/core/profiling/timers_preciseclock.h',
'src/core/statistics/census_interface.h',
'src/core/statistics/census_rpc_stats.h',
'src/core/surface/byte_buffer_queue.h',
'src/core/surface/call.h',
'src/core/surface/channel.h',

@ -53,6 +53,37 @@ static ProtoMethod *kInexistentMethod;
static ProtoMethod *kEmptyCallMethod;
static ProtoMethod *kUnaryCallMethod;
// This is an observer class for testing that responseMetadata is KVO-compliant
@interface PassthroughObserver : NSObject
- (instancetype) initWithCallback:(void (^)(NSString*, id, NSDictionary*))callback;
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change
context:(void *)context;
@end
@implementation PassthroughObserver {
void (^_callback)(NSString*, id, NSDictionary*);
}
- (instancetype)initWithCallback:(void (^)(NSString *, id, NSDictionary *))callback {
self = [super init];
if (self) {
_callback = callback;
}
return self;
}
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
_callback(keyPath, object, change);
[object removeObserver:self forKeyPath:keyPath];
}
@end
@interface GRPCClientTests : XCTestCase
@end
@ -183,4 +214,35 @@ static ProtoMethod *kUnaryCallMethod;
[self waitForExpectationsWithTimeout:4 handler:nil];
}
- (void)testResponseMetadataKVO {
__weak XCTestExpectation *response = [self expectationWithDescription:@"Empty response received."];
__weak XCTestExpectation *completion = [self expectationWithDescription:@"Empty RPC completed."];
__weak XCTestExpectation *metadata = [self expectationWithDescription:@"Metadata changed."];
GRPCCall *call = [[GRPCCall alloc] initWithHost:kHostAddress
path:kEmptyCallMethod.HTTPPath
requestsWriter:[GRXWriter writerWithValue:[NSData data]]];
PassthroughObserver *observer = [[PassthroughObserver alloc] initWithCallback:^(NSString *keypath, id object, NSDictionary * change) {
if ([keypath isEqual: @"responseHeaders"]) {
[metadata fulfill];
}
}];
[call addObserver:observer forKeyPath:@"responseHeaders" options:0 context:NULL];
id<GRXWriteable> responsesWriteable = [[GRXWriteable alloc] initWithValueHandler:^(NSData *value) {
XCTAssertNotNil(value, @"nil value received as response.");
XCTAssertEqual([value length], 0, @"Non-empty response received: %@", value);
[response fulfill];
} completionHandler:^(NSError *errorOrNil) {
XCTAssertNil(errorOrNil, @"Finished with unexpected error: %@", errorOrNil);
[completion fulfill];
}];
[call startWithWriteable:responsesWriteable];
[self waitForExpectationsWithTimeout:8 handler:nil];
}
@end

@ -846,6 +846,8 @@ src/core/json/json_reader.h \
src/core/json/json_writer.h \
src/core/profiling/timers.h \
src/core/profiling/timers_preciseclock.h \
src/core/statistics/census_interface.h \
src/core/statistics/census_rpc_stats.h \
src/core/surface/byte_buffer_queue.h \
src/core/surface/call.h \
src/core/surface/channel.h \

@ -12340,6 +12340,8 @@
"src/core/security/secure_transport_setup.h",
"src/core/security/security_connector.h",
"src/core/security/security_context.h",
"src/core/statistics/census_interface.h",
"src/core/statistics/census_rpc_stats.h",
"src/core/surface/byte_buffer_queue.h",
"src/core/surface/call.h",
"src/core/surface/channel.h",
@ -12556,6 +12558,8 @@
"src/core/security/security_context.h",
"src/core/security/server_auth_filter.c",
"src/core/security/server_secure_chttp2.c",
"src/core/statistics/census_interface.h",
"src/core/statistics/census_rpc_stats.h",
"src/core/surface/byte_buffer.c",
"src/core/surface/byte_buffer_queue.c",
"src/core/surface/byte_buffer_queue.h",
@ -12806,6 +12810,8 @@
"src/core/json/json_writer.h",
"src/core/profiling/timers.h",
"src/core/profiling/timers_preciseclock.h",
"src/core/statistics/census_interface.h",
"src/core/statistics/census_rpc_stats.h",
"src/core/surface/byte_buffer_queue.h",
"src/core/surface/call.h",
"src/core/surface/channel.h",
@ -12992,6 +12998,8 @@
"src/core/profiling/stap_timers.c",
"src/core/profiling/timers.h",
"src/core/profiling/timers_preciseclock.h",
"src/core/statistics/census_interface.h",
"src/core/statistics/census_rpc_stats.h",
"src/core/surface/byte_buffer.c",
"src/core/surface/byte_buffer_queue.c",
"src/core/surface/byte_buffer_queue.h",

@ -308,6 +308,8 @@
<ClInclude Include="..\..\src\core\json\json_writer.h" />
<ClInclude Include="..\..\src\core\profiling\timers.h" />
<ClInclude Include="..\..\src\core\profiling\timers_preciseclock.h" />
<ClInclude Include="..\..\src\core\statistics\census_interface.h" />
<ClInclude Include="..\..\src\core\statistics\census_rpc_stats.h" />
<ClInclude Include="..\..\src\core\surface\byte_buffer_queue.h" />
<ClInclude Include="..\..\src\core\surface\call.h" />
<ClInclude Include="..\..\src\core\surface\channel.h" />

@ -683,6 +683,12 @@
<ClInclude Include="..\..\src\core\profiling\timers_preciseclock.h">
<Filter>src\core\profiling</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\statistics\census_interface.h">
<Filter>src\core\statistics</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\statistics\census_rpc_stats.h">
<Filter>src\core\statistics</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\surface\byte_buffer_queue.h">
<Filter>src\core\surface</Filter>
</ClInclude>
@ -845,6 +851,9 @@
<Filter Include="src\core\security">
<UniqueIdentifier>{1d850ac6-e639-4eab-5338-4ba40272fcc9}</UniqueIdentifier>
</Filter>
<Filter Include="src\core\statistics">
<UniqueIdentifier>{0ef49896-2313-4a3f-1ce2-716fa0e5c6ca}</UniqueIdentifier>
</Filter>
<Filter Include="src\core\surface">
<UniqueIdentifier>{aeb18e82-5d25-0aad-8b02-a0a3470073ce}</UniqueIdentifier>
</Filter>

@ -291,6 +291,8 @@
<ClInclude Include="..\..\src\core\json\json_writer.h" />
<ClInclude Include="..\..\src\core\profiling\timers.h" />
<ClInclude Include="..\..\src\core\profiling\timers_preciseclock.h" />
<ClInclude Include="..\..\src\core\statistics\census_interface.h" />
<ClInclude Include="..\..\src\core\statistics\census_rpc_stats.h" />
<ClInclude Include="..\..\src\core\surface\byte_buffer_queue.h" />
<ClInclude Include="..\..\src\core\surface\call.h" />
<ClInclude Include="..\..\src\core\surface\channel.h" />

@ -581,6 +581,12 @@
<ClInclude Include="..\..\src\core\profiling\timers_preciseclock.h">
<Filter>src\core\profiling</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\statistics\census_interface.h">
<Filter>src\core\statistics</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\statistics\census_rpc_stats.h">
<Filter>src\core\statistics</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\surface\byte_buffer_queue.h">
<Filter>src\core\surface</Filter>
</ClInclude>
@ -740,6 +746,9 @@
<Filter Include="src\core\profiling">
<UniqueIdentifier>{7f91d9bf-c9de-835a-d74d-b16f843b89a9}</UniqueIdentifier>
</Filter>
<Filter Include="src\core\statistics">
<UniqueIdentifier>{e084164c-a069-00e3-db35-4e0b1cd6f0b7}</UniqueIdentifier>
</Filter>
<Filter Include="src\core\surface">
<UniqueIdentifier>{6cd0127e-c24b-d43c-38f5-198db8d4322a}</UniqueIdentifier>
</Filter>

Loading…
Cancel
Save