Merge pull request #3997 from a-veitch/fix_tsan_cpu_test
Fix for long-running tsan test
diff --git a/.gitignore b/.gitignore
index 5972f82..40f4c47 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,6 +46,9 @@
*-gyp.mk
out
+# YCM config files
+.ycm_extra_conf.py
+
# XCode
build/
*.pbxuser
diff --git a/.travis.yml b/.travis.yml
index b6c8062..d2d1c8b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,42 +1,32 @@
-language: cpp
-before_install:
- - sudo add-apt-repository ppa:yjwong/gflags -y
- - sudo add-apt-repository ppa:h-rayflood/llvm -y
- - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
- - echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
- - echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
- - sudo apt-get update -qq
- - sudo apt-get install -qq libgtest-dev libgflags-dev python-virtualenv python-dev python3-dev clang-3.5
- - sudo pip install --upgrade virtualenv
- - sudo pip install cpp-coveralls mako simplejson
- - sudo apt-get install -qq mono-devel nunit
- - wget www.nuget.org/NuGet.exe -O nuget.exe
+language: objective-c
+osx_image: xcode7.1
env:
global:
- - RUBY_VERSION=2.1
- - COVERALLS_PARALLEL=true
- - CPPFLAGS=-I/tmp/prebuilt/include
- - NUGET="mono nuget.exe"
- matrix:
- - CONFIG=opt TEST=sanity JOBS=1
- - CONFIG=gcov TEST=c JOBS=16
- - CONFIG=gcov TEST=c++ JOBS=16
- - CONFIG=opt TEST=c JOBS=16
- - CONFIG=opt TEST=c++ JOBS=16
- - CONFIG=opt TEST=node JOBS=16
- - CONFIG=opt TEST=ruby JOBS=16
- - CONFIG=opt TEST=python JOBS=1
- - CONFIG=opt TEST=csharp JOBS=16
- - USE_GCC=4.4 CONFIG=opt TEST=build JOBS=16
-script:
- - rvm use $RUBY_VERSION
- - gem install bundler
- - ./tools/run_tests/prepare_travis.sh
- - if [ ! -z "$USE_GCC" ] ; then export CC=gcc-$USE_GCC ; export CXX=g++-$USE_GCC ; fi
- - ./tools/run_tests/run_tests.py -l $TEST -t -j $JOBS -c $CONFIG -s 4.0
-after_success:
- - if [ "$CONFIG" = "gcov" ] ; then coveralls --exclude third_party --exclude gens --exclude test --exclude tools --exclude src/compiler -b. --gcov-options '\-p' ; fi
+ - CONFIG=opt
+ - TEST=objc
+ - JOBS=1
+before_install:
+ - brew install gflags
+ # Pod install does this too, but we don't want the output.
+ - pod repo update --silent
+install:
+ - make grpc_objective_c_plugin
+ - pushd src/objective-c/tests
+ # Needs to be verbose, or otherwise OpenSSL's prepare_command makes Travis
+ # time out:
+ - pod install --verbose
+ - popd
+before_script:
+ - make interop_server
+ - bins/$CONFIG/interop_server --port=5050 &
+ - bins/$CONFIG/interop_server --port=5051 --use_tls &
+xcode_workspace: src/objective-c/tests/Tests.xcworkspace
+xcode_scheme:
+ - RxLibraryUnitTests
+ - InteropTestsLocalSSL
+ - InteropTestsLocalCleartext
+ # TODO(jcanizales): Investigate why they time out:
+ # - InteropTestsRemote
+xcode_sdk: iphonesimulator9.1
notifications:
email: false
- webhooks:
- - https://coveralls.io/webhook?repo_token=54IxAHPjJNdQJzJAhPU0MFpCtg7KvcydQ
diff --git a/Makefile b/Makefile
index fe6dca1..a255233 100644
--- a/Makefile
+++ b/Makefile
@@ -894,6 +894,7 @@
shutdown_test: $(BINDIR)/$(CONFIG)/shutdown_test
status_test: $(BINDIR)/$(CONFIG)/status_test
streaming_throughput_test: $(BINDIR)/$(CONFIG)/streaming_throughput_test
+stress_test: $(BINDIR)/$(CONFIG)/stress_test
sync_streaming_ping_pong_test: $(BINDIR)/$(CONFIG)/sync_streaming_ping_pong_test
sync_unary_ping_pong_test: $(BINDIR)/$(CONFIG)/sync_unary_ping_pong_test
thread_stress_test: $(BINDIR)/$(CONFIG)/thread_stress_test
@@ -1801,7 +1802,7 @@
buildtests_c: privatelibs_c $(BINDIR)/$(CONFIG)/alpn_test $(BINDIR)/$(CONFIG)/bin_encoder_test $(BINDIR)/$(CONFIG)/chttp2_status_conversion_test $(BINDIR)/$(CONFIG)/chttp2_stream_encoder_test $(BINDIR)/$(CONFIG)/chttp2_stream_map_test $(BINDIR)/$(CONFIG)/compression_test $(BINDIR)/$(CONFIG)/dualstack_socket_test $(BINDIR)/$(CONFIG)/endpoint_pair_test $(BINDIR)/$(CONFIG)/fd_conservation_posix_test $(BINDIR)/$(CONFIG)/fd_posix_test $(BINDIR)/$(CONFIG)/fling_client $(BINDIR)/$(CONFIG)/fling_server $(BINDIR)/$(CONFIG)/fling_stream_test $(BINDIR)/$(CONFIG)/fling_test $(BINDIR)/$(CONFIG)/gpr_cmdline_test $(BINDIR)/$(CONFIG)/gpr_cpu_test $(BINDIR)/$(CONFIG)/gpr_env_test $(BINDIR)/$(CONFIG)/gpr_file_test $(BINDIR)/$(CONFIG)/gpr_histogram_test $(BINDIR)/$(CONFIG)/gpr_host_port_test $(BINDIR)/$(CONFIG)/gpr_log_test $(BINDIR)/$(CONFIG)/gpr_slice_buffer_test $(BINDIR)/$(CONFIG)/gpr_slice_test $(BINDIR)/$(CONFIG)/gpr_stack_lockfree_test $(BINDIR)/$(CONFIG)/gpr_string_test $(BINDIR)/$(CONFIG)/gpr_sync_test $(BINDIR)/$(CONFIG)/gpr_thd_test $(BINDIR)/$(CONFIG)/gpr_time_test $(BINDIR)/$(CONFIG)/gpr_tls_test $(BINDIR)/$(CONFIG)/gpr_useful_test $(BINDIR)/$(CONFIG)/grpc_auth_context_test $(BINDIR)/$(CONFIG)/grpc_base64_test $(BINDIR)/$(CONFIG)/grpc_byte_buffer_reader_test $(BINDIR)/$(CONFIG)/grpc_channel_args_test $(BINDIR)/$(CONFIG)/grpc_channel_stack_test $(BINDIR)/$(CONFIG)/grpc_completion_queue_test $(BINDIR)/$(CONFIG)/grpc_credentials_test $(BINDIR)/$(CONFIG)/grpc_json_token_test $(BINDIR)/$(CONFIG)/grpc_jwt_verifier_test $(BINDIR)/$(CONFIG)/grpc_security_connector_test $(BINDIR)/$(CONFIG)/grpc_stream_op_test $(BINDIR)/$(CONFIG)/hpack_parser_test $(BINDIR)/$(CONFIG)/hpack_table_test $(BINDIR)/$(CONFIG)/httpcli_format_request_test $(BINDIR)/$(CONFIG)/httpcli_parser_test $(BINDIR)/$(CONFIG)/httpcli_test $(BINDIR)/$(CONFIG)/json_rewrite $(BINDIR)/$(CONFIG)/json_rewrite_test $(BINDIR)/$(CONFIG)/json_test $(BINDIR)/$(CONFIG)/lame_client_test $(BINDIR)/$(CONFIG)/lb_policies_test $(BINDIR)/$(CONFIG)/message_compress_test $(BINDIR)/$(CONFIG)/multi_init_test $(BINDIR)/$(CONFIG)/multiple_server_queues_test $(BINDIR)/$(CONFIG)/murmur_hash_test $(BINDIR)/$(CONFIG)/no_server_test $(BINDIR)/$(CONFIG)/resolve_address_test $(BINDIR)/$(CONFIG)/secure_endpoint_test $(BINDIR)/$(CONFIG)/sockaddr_utils_test $(BINDIR)/$(CONFIG)/tcp_client_posix_test $(BINDIR)/$(CONFIG)/tcp_posix_test $(BINDIR)/$(CONFIG)/tcp_server_posix_test $(BINDIR)/$(CONFIG)/time_averaged_stats_test $(BINDIR)/$(CONFIG)/timeout_encoding_test $(BINDIR)/$(CONFIG)/timer_heap_test $(BINDIR)/$(CONFIG)/timer_list_test $(BINDIR)/$(CONFIG)/timers_test $(BINDIR)/$(CONFIG)/transport_metadata_test $(BINDIR)/$(CONFIG)/transport_security_test $(BINDIR)/$(CONFIG)/udp_server_test $(BINDIR)/$(CONFIG)/uri_parser_test $(BINDIR)/$(CONFIG)/workqueue_test $(BINDIR)/$(CONFIG)/h2_compress_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_compress_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_compress_call_creds_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_compress_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_compress_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_compress_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_compress_default_host_test $(BINDIR)/$(CONFIG)/h2_compress_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_compress_empty_batch_test $(BINDIR)/$(CONFIG)/h2_compress_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_compress_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_compress_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_compress_large_metadata_test $(BINDIR)/$(CONFIG)/h2_compress_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_compress_max_message_length_test $(BINDIR)/$(CONFIG)/h2_compress_metadata_test $(BINDIR)/$(CONFIG)/h2_compress_no_op_test $(BINDIR)/$(CONFIG)/h2_compress_payload_test $(BINDIR)/$(CONFIG)/h2_compress_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_compress_registered_call_test $(BINDIR)/$(CONFIG)/h2_compress_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_compress_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_compress_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_compress_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_compress_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_compress_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_compress_simple_request_test $(BINDIR)/$(CONFIG)/h2_compress_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_fakesec_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_fakesec_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_fakesec_call_creds_test $(BINDIR)/$(CONFIG)/h2_fakesec_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_fakesec_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_fakesec_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_fakesec_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_fakesec_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_fakesec_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_fakesec_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_fakesec_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_fakesec_default_host_test $(BINDIR)/$(CONFIG)/h2_fakesec_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_fakesec_empty_batch_test $(BINDIR)/$(CONFIG)/h2_fakesec_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_fakesec_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_fakesec_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_fakesec_large_metadata_test $(BINDIR)/$(CONFIG)/h2_fakesec_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_fakesec_max_message_length_test $(BINDIR)/$(CONFIG)/h2_fakesec_metadata_test $(BINDIR)/$(CONFIG)/h2_fakesec_no_op_test $(BINDIR)/$(CONFIG)/h2_fakesec_payload_test $(BINDIR)/$(CONFIG)/h2_fakesec_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_fakesec_registered_call_test $(BINDIR)/$(CONFIG)/h2_fakesec_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_fakesec_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_fakesec_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_fakesec_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_fakesec_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_fakesec_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_fakesec_simple_request_test $(BINDIR)/$(CONFIG)/h2_fakesec_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_full_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_full_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_full_call_creds_test $(BINDIR)/$(CONFIG)/h2_full_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_full_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_full_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_full_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_full_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_full_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_full_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_full_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_full_default_host_test $(BINDIR)/$(CONFIG)/h2_full_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_full_empty_batch_test $(BINDIR)/$(CONFIG)/h2_full_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_full_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_full_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_full_large_metadata_test $(BINDIR)/$(CONFIG)/h2_full_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_full_max_message_length_test $(BINDIR)/$(CONFIG)/h2_full_metadata_test $(BINDIR)/$(CONFIG)/h2_full_no_op_test $(BINDIR)/$(CONFIG)/h2_full_payload_test $(BINDIR)/$(CONFIG)/h2_full_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_full_registered_call_test $(BINDIR)/$(CONFIG)/h2_full_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_full_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_full_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_full_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_full_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_full_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_full_simple_request_test $(BINDIR)/$(CONFIG)/h2_full_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_full+poll_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_full+poll_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_full+poll_call_creds_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_full+poll_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_full+poll_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_full+poll_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_full+poll_default_host_test $(BINDIR)/$(CONFIG)/h2_full+poll_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_full+poll_empty_batch_test $(BINDIR)/$(CONFIG)/h2_full+poll_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_full+poll_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_full+poll_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_full+poll_large_metadata_test $(BINDIR)/$(CONFIG)/h2_full+poll_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_full+poll_max_message_length_test $(BINDIR)/$(CONFIG)/h2_full+poll_metadata_test $(BINDIR)/$(CONFIG)/h2_full+poll_no_op_test $(BINDIR)/$(CONFIG)/h2_full+poll_payload_test $(BINDIR)/$(CONFIG)/h2_full+poll_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_full+poll_registered_call_test $(BINDIR)/$(CONFIG)/h2_full+poll_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_full+poll_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_full+poll_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_full+poll_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_full+poll_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_full+poll_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_full+poll_simple_request_test $(BINDIR)/$(CONFIG)/h2_full+poll_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_oauth2_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_oauth2_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_oauth2_call_creds_test $(BINDIR)/$(CONFIG)/h2_oauth2_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_oauth2_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_oauth2_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_oauth2_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_oauth2_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_oauth2_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_oauth2_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_oauth2_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_oauth2_default_host_test $(BINDIR)/$(CONFIG)/h2_oauth2_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_oauth2_empty_batch_test $(BINDIR)/$(CONFIG)/h2_oauth2_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_oauth2_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_oauth2_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_oauth2_large_metadata_test $(BINDIR)/$(CONFIG)/h2_oauth2_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_oauth2_max_message_length_test $(BINDIR)/$(CONFIG)/h2_oauth2_metadata_test $(BINDIR)/$(CONFIG)/h2_oauth2_no_op_test $(BINDIR)/$(CONFIG)/h2_oauth2_payload_test $(BINDIR)/$(CONFIG)/h2_oauth2_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_oauth2_registered_call_test $(BINDIR)/$(CONFIG)/h2_oauth2_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_oauth2_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_oauth2_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_oauth2_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_oauth2_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_oauth2_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_oauth2_simple_request_test $(BINDIR)/$(CONFIG)/h2_oauth2_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_proxy_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_proxy_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_proxy_call_creds_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_proxy_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_proxy_default_host_test $(BINDIR)/$(CONFIG)/h2_proxy_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_proxy_empty_batch_test $(BINDIR)/$(CONFIG)/h2_proxy_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_proxy_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_proxy_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_proxy_large_metadata_test $(BINDIR)/$(CONFIG)/h2_proxy_max_message_length_test $(BINDIR)/$(CONFIG)/h2_proxy_metadata_test $(BINDIR)/$(CONFIG)/h2_proxy_no_op_test $(BINDIR)/$(CONFIG)/h2_proxy_payload_test $(BINDIR)/$(CONFIG)/h2_proxy_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_proxy_registered_call_test $(BINDIR)/$(CONFIG)/h2_proxy_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_proxy_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_proxy_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_proxy_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_proxy_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_proxy_simple_request_test $(BINDIR)/$(CONFIG)/h2_proxy_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_sockpair_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair_call_creds_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_sockpair_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_sockpair_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair_empty_batch_test $(BINDIR)/$(CONFIG)/h2_sockpair_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_sockpair_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_sockpair_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_sockpair_large_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_sockpair_max_message_length_test $(BINDIR)/$(CONFIG)/h2_sockpair_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair_no_op_test $(BINDIR)/$(CONFIG)/h2_sockpair_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_sockpair_registered_call_test $(BINDIR)/$(CONFIG)/h2_sockpair_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_sockpair_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_sockpair_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_sockpair_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_sockpair_simple_request_test $(BINDIR)/$(CONFIG)/h2_sockpair_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_call_creds_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_empty_batch_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_large_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_max_message_length_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_no_op_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_registered_call_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_simple_request_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_call_creds_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_empty_batch_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_large_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_max_message_length_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_metadata_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_no_op_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_registered_call_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_simple_request_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_ssl_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl_call_creds_test $(BINDIR)/$(CONFIG)/h2_ssl_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_ssl_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_ssl_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_ssl_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_ssl_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_ssl_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_ssl_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_ssl_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_ssl_default_host_test $(BINDIR)/$(CONFIG)/h2_ssl_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_ssl_empty_batch_test $(BINDIR)/$(CONFIG)/h2_ssl_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_ssl_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_ssl_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_ssl_large_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_ssl_max_message_length_test $(BINDIR)/$(CONFIG)/h2_ssl_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl_no_op_test $(BINDIR)/$(CONFIG)/h2_ssl_payload_test $(BINDIR)/$(CONFIG)/h2_ssl_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_ssl_registered_call_test $(BINDIR)/$(CONFIG)/h2_ssl_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_ssl_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_ssl_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_ssl_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_ssl_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_ssl_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_ssl_simple_request_test $(BINDIR)/$(CONFIG)/h2_ssl_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_call_creds_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_default_host_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_empty_batch_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_large_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_max_message_length_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_no_op_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_payload_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_registered_call_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_simple_request_test $(BINDIR)/$(CONFIG)/h2_ssl+poll_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_call_creds_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_default_host_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_empty_batch_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_large_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_max_message_length_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_metadata_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_no_op_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_payload_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_registered_call_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_simple_request_test $(BINDIR)/$(CONFIG)/h2_ssl_proxy_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_uchannel_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_uchannel_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_uchannel_call_creds_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_uchannel_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_uchannel_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_uchannel_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_uchannel_default_host_test $(BINDIR)/$(CONFIG)/h2_uchannel_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_uchannel_empty_batch_test $(BINDIR)/$(CONFIG)/h2_uchannel_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_uchannel_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_uchannel_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_uchannel_large_metadata_test $(BINDIR)/$(CONFIG)/h2_uchannel_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_uchannel_max_message_length_test $(BINDIR)/$(CONFIG)/h2_uchannel_metadata_test $(BINDIR)/$(CONFIG)/h2_uchannel_no_op_test $(BINDIR)/$(CONFIG)/h2_uchannel_payload_test $(BINDIR)/$(CONFIG)/h2_uchannel_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_uchannel_registered_call_test $(BINDIR)/$(CONFIG)/h2_uchannel_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_uchannel_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_uchannel_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_uchannel_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_uchannel_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_uchannel_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_uchannel_simple_request_test $(BINDIR)/$(CONFIG)/h2_uchannel_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_uds_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_uds_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_uds_call_creds_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_uds_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_uds_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_uds_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_uds_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_uds_empty_batch_test $(BINDIR)/$(CONFIG)/h2_uds_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_uds_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_uds_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_uds_large_metadata_test $(BINDIR)/$(CONFIG)/h2_uds_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_uds_max_message_length_test $(BINDIR)/$(CONFIG)/h2_uds_metadata_test $(BINDIR)/$(CONFIG)/h2_uds_no_op_test $(BINDIR)/$(CONFIG)/h2_uds_payload_test $(BINDIR)/$(CONFIG)/h2_uds_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_uds_registered_call_test $(BINDIR)/$(CONFIG)/h2_uds_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_uds_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_uds_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_uds_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_uds_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_uds_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_uds_simple_request_test $(BINDIR)/$(CONFIG)/h2_uds_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_uds+poll_bad_hostname_test $(BINDIR)/$(CONFIG)/h2_uds+poll_binary_metadata_test $(BINDIR)/$(CONFIG)/h2_uds+poll_call_creds_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_after_accept_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_after_client_done_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_after_invoke_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_before_invoke_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_in_a_vacuum_test $(BINDIR)/$(CONFIG)/h2_uds+poll_census_simple_request_test $(BINDIR)/$(CONFIG)/h2_uds+poll_channel_connectivity_test $(BINDIR)/$(CONFIG)/h2_uds+poll_compressed_payload_test $(BINDIR)/$(CONFIG)/h2_uds+poll_disappearing_server_test $(BINDIR)/$(CONFIG)/h2_uds+poll_empty_batch_test $(BINDIR)/$(CONFIG)/h2_uds+poll_graceful_server_shutdown_test $(BINDIR)/$(CONFIG)/h2_uds+poll_high_initial_seqno_test $(BINDIR)/$(CONFIG)/h2_uds+poll_invoke_large_request_test $(BINDIR)/$(CONFIG)/h2_uds+poll_large_metadata_test $(BINDIR)/$(CONFIG)/h2_uds+poll_max_concurrent_streams_test $(BINDIR)/$(CONFIG)/h2_uds+poll_max_message_length_test $(BINDIR)/$(CONFIG)/h2_uds+poll_metadata_test $(BINDIR)/$(CONFIG)/h2_uds+poll_no_op_test $(BINDIR)/$(CONFIG)/h2_uds+poll_payload_test $(BINDIR)/$(CONFIG)/h2_uds+poll_ping_pong_streaming_test $(BINDIR)/$(CONFIG)/h2_uds+poll_registered_call_test $(BINDIR)/$(CONFIG)/h2_uds+poll_request_with_flags_test $(BINDIR)/$(CONFIG)/h2_uds+poll_request_with_payload_test $(BINDIR)/$(CONFIG)/h2_uds+poll_server_finishes_request_test $(BINDIR)/$(CONFIG)/h2_uds+poll_shutdown_finishes_calls_test $(BINDIR)/$(CONFIG)/h2_uds+poll_shutdown_finishes_tags_test $(BINDIR)/$(CONFIG)/h2_uds+poll_simple_delayed_request_test $(BINDIR)/$(CONFIG)/h2_uds+poll_simple_request_test $(BINDIR)/$(CONFIG)/h2_uds+poll_trailing_metadata_test $(BINDIR)/$(CONFIG)/h2_compress_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_channel_connectivity_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_default_host_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_disappearing_server_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_simple_delayed_request_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_compress_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_full_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_full_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_full_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_full_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_full_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_full_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_full_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_full_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full_channel_connectivity_nosec_test $(BINDIR)/$(CONFIG)/h2_full_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_full_default_host_nosec_test $(BINDIR)/$(CONFIG)/h2_full_disappearing_server_nosec_test $(BINDIR)/$(CONFIG)/h2_full_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_full_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_full_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_full_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_full_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_full_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_full_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_full_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_full_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_full_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_full_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_full_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_full_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_full_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_full_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_full_simple_delayed_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_channel_connectivity_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_default_host_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_disappearing_server_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_simple_delayed_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_full+poll_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_default_host_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_disappearing_server_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_simple_delayed_request_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_proxy_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair+trace_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_channel_connectivity_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_default_host_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_disappearing_server_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_simple_delayed_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uchannel_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_channel_connectivity_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_disappearing_server_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_simple_delayed_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_bad_hostname_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_binary_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_after_accept_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_after_client_done_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_after_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_before_invoke_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_cancel_in_a_vacuum_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_census_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_channel_connectivity_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_compressed_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_disappearing_server_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_empty_batch_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_graceful_server_shutdown_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_high_initial_seqno_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_invoke_large_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_large_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_max_concurrent_streams_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_max_message_length_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_metadata_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_no_op_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_ping_pong_streaming_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_registered_call_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_request_with_flags_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_request_with_payload_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_server_finishes_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_shutdown_finishes_calls_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_shutdown_finishes_tags_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_simple_delayed_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_simple_request_nosec_test $(BINDIR)/$(CONFIG)/h2_uds+poll_trailing_metadata_nosec_test $(BINDIR)/$(CONFIG)/connection_prefix_bad_client_test $(BINDIR)/$(CONFIG)/initial_settings_frame_bad_client_test
-buildtests_cxx: buildtests_zookeeper privatelibs_cxx $(BINDIR)/$(CONFIG)/async_end2end_test $(BINDIR)/$(CONFIG)/async_streaming_ping_pong_test $(BINDIR)/$(CONFIG)/async_unary_ping_pong_test $(BINDIR)/$(CONFIG)/auth_property_iterator_test $(BINDIR)/$(CONFIG)/channel_arguments_test $(BINDIR)/$(CONFIG)/cli_call_test $(BINDIR)/$(CONFIG)/client_crash_test $(BINDIR)/$(CONFIG)/client_crash_test_server $(BINDIR)/$(CONFIG)/credentials_test $(BINDIR)/$(CONFIG)/cxx_byte_buffer_test $(BINDIR)/$(CONFIG)/cxx_slice_test $(BINDIR)/$(CONFIG)/cxx_string_ref_test $(BINDIR)/$(CONFIG)/cxx_time_test $(BINDIR)/$(CONFIG)/end2end_test $(BINDIR)/$(CONFIG)/generic_end2end_test $(BINDIR)/$(CONFIG)/grpc_cli $(BINDIR)/$(CONFIG)/interop_client $(BINDIR)/$(CONFIG)/interop_server $(BINDIR)/$(CONFIG)/interop_test $(BINDIR)/$(CONFIG)/mock_test $(BINDIR)/$(CONFIG)/qps_interarrival_test $(BINDIR)/$(CONFIG)/qps_openloop_test $(BINDIR)/$(CONFIG)/qps_test $(BINDIR)/$(CONFIG)/reconnect_interop_client $(BINDIR)/$(CONFIG)/reconnect_interop_server $(BINDIR)/$(CONFIG)/secure_auth_context_test $(BINDIR)/$(CONFIG)/server_crash_test $(BINDIR)/$(CONFIG)/server_crash_test_client $(BINDIR)/$(CONFIG)/shutdown_test $(BINDIR)/$(CONFIG)/status_test $(BINDIR)/$(CONFIG)/streaming_throughput_test $(BINDIR)/$(CONFIG)/sync_streaming_ping_pong_test $(BINDIR)/$(CONFIG)/sync_unary_ping_pong_test $(BINDIR)/$(CONFIG)/thread_stress_test
+buildtests_cxx: buildtests_zookeeper privatelibs_cxx $(BINDIR)/$(CONFIG)/async_end2end_test $(BINDIR)/$(CONFIG)/async_streaming_ping_pong_test $(BINDIR)/$(CONFIG)/async_unary_ping_pong_test $(BINDIR)/$(CONFIG)/auth_property_iterator_test $(BINDIR)/$(CONFIG)/channel_arguments_test $(BINDIR)/$(CONFIG)/cli_call_test $(BINDIR)/$(CONFIG)/client_crash_test $(BINDIR)/$(CONFIG)/client_crash_test_server $(BINDIR)/$(CONFIG)/credentials_test $(BINDIR)/$(CONFIG)/cxx_byte_buffer_test $(BINDIR)/$(CONFIG)/cxx_slice_test $(BINDIR)/$(CONFIG)/cxx_string_ref_test $(BINDIR)/$(CONFIG)/cxx_time_test $(BINDIR)/$(CONFIG)/end2end_test $(BINDIR)/$(CONFIG)/generic_end2end_test $(BINDIR)/$(CONFIG)/grpc_cli $(BINDIR)/$(CONFIG)/interop_client $(BINDIR)/$(CONFIG)/interop_server $(BINDIR)/$(CONFIG)/interop_test $(BINDIR)/$(CONFIG)/mock_test $(BINDIR)/$(CONFIG)/qps_interarrival_test $(BINDIR)/$(CONFIG)/qps_openloop_test $(BINDIR)/$(CONFIG)/qps_test $(BINDIR)/$(CONFIG)/reconnect_interop_client $(BINDIR)/$(CONFIG)/reconnect_interop_server $(BINDIR)/$(CONFIG)/secure_auth_context_test $(BINDIR)/$(CONFIG)/server_crash_test $(BINDIR)/$(CONFIG)/server_crash_test_client $(BINDIR)/$(CONFIG)/shutdown_test $(BINDIR)/$(CONFIG)/status_test $(BINDIR)/$(CONFIG)/streaming_throughput_test $(BINDIR)/$(CONFIG)/stress_test $(BINDIR)/$(CONFIG)/sync_streaming_ping_pong_test $(BINDIR)/$(CONFIG)/sync_unary_ping_pong_test $(BINDIR)/$(CONFIG)/thread_stress_test
ifeq ($(HAS_ZOOKEEPER),true)
buildtests_zookeeper: privatelibs_zookeeper $(BINDIR)/$(CONFIG)/zookeeper_test
@@ -3545,8 +3546,6 @@
$(Q) $(BINDIR)/$(CONFIG)/interop_test || ( echo test interop_test failed ; exit 1 )
$(E) "[RUN] Testing mock_test"
$(Q) $(BINDIR)/$(CONFIG)/mock_test || ( echo test mock_test failed ; exit 1 )
- $(E) "[RUN] Testing qps_openloop_test"
- $(Q) $(BINDIR)/$(CONFIG)/qps_openloop_test || ( echo test qps_openloop_test failed ; exit 1 )
$(E) "[RUN] Testing qps_test"
$(Q) $(BINDIR)/$(CONFIG)/qps_test || ( echo test qps_test failed ; exit 1 )
$(E) "[RUN] Testing secure_auth_context_test"
@@ -10524,6 +10523,56 @@
endif
+STRESS_TEST_SRC = \
+ $(GENDIR)/test/proto/empty.pb.cc $(GENDIR)/test/proto/empty.grpc.pb.cc \
+ $(GENDIR)/test/proto/messages.pb.cc $(GENDIR)/test/proto/messages.grpc.pb.cc \
+ $(GENDIR)/test/proto/test.pb.cc $(GENDIR)/test/proto/test.grpc.pb.cc \
+ test/cpp/interop/interop_client.cc \
+ test/cpp/interop/stress_interop_client.cc \
+ test/cpp/interop/stress_test.cc \
+
+STRESS_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(STRESS_TEST_SRC))))
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure targets if you don't have OpenSSL.
+
+$(BINDIR)/$(CONFIG)/stress_test: openssl_dep_error
+
+else
+
+
+ifeq ($(NO_PROTOBUF),true)
+
+# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+.
+
+$(BINDIR)/$(CONFIG)/stress_test: protobuf_dep_error
+
+else
+
+$(BINDIR)/$(CONFIG)/stress_test: $(PROTOBUF_DEP) $(STRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
+ $(E) "[LD] Linking $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(LDXX) $(LDFLAGS) $(STRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/stress_test
+
+endif
+
+endif
+
+$(OBJDIR)/$(CONFIG)/test/proto/empty.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
+$(OBJDIR)/$(CONFIG)/test/proto/messages.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
+$(OBJDIR)/$(CONFIG)/test/proto/test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
+$(OBJDIR)/$(CONFIG)/test/cpp/interop/interop_client.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
+$(OBJDIR)/$(CONFIG)/test/cpp/interop/stress_interop_client.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
+$(OBJDIR)/$(CONFIG)/test/cpp/interop/stress_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
+deps_stress_test: $(STRESS_TEST_OBJS:.o=.dep)
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(STRESS_TEST_OBJS:.o=.dep)
+endif
+endif
+
+
SYNC_STREAMING_PING_PONG_TEST_SRC = \
test/cpp/qps/sync_streaming_ping_pong_test.cc \
diff --git a/README.md b/README.md
index 2ef6c3d..74e9e82 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,4 @@
[](https://grpc-testing.appspot.com/job/gRPC_master)
-[](https://coveralls.io/r/grpc/grpc?branch=master)
[gRPC - An RPC library and framework](http://github.com/grpc/grpc)
===================================
diff --git a/binding.gyp b/binding.gyp
index 050bc40..52e0ea6 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -54,7 +54,9 @@
],
'include_dirs': [
'.',
- 'include'
+ 'include',
+ '<(node_root_dir)/deps/openssl/openssl/include',
+ '<(node_root_dir)/deps/zlib'
],
'conditions': [
['OS != "win"', {
@@ -73,6 +75,15 @@
]
]
}],
+ ["target_arch=='ia32'", {
+ "include_dirs": [ "<(node_root_dir)/deps/openssl/config/piii" ]
+ }],
+ ["target_arch=='x64'", {
+ "include_dirs": [ "<(node_root_dir)/deps/openssl/config/k8" ]
+ }],
+ ["target_arch=='arm'", {
+ "include_dirs": [ "<(node_root_dir)/deps/openssl/config/arm" ]
+ }]
]
},
'targets': [
@@ -124,6 +135,13 @@
'src/core/support/time_win32.c',
'src/core/support/tls_pthread.c',
],
+ "conditions": [
+ ['OS == "mac"', {
+ 'xcode_settings': {
+ 'MACOSX_DEPLOYMENT_TARGET': '10.9'
+ }
+ }]
+ ],
},
{
'target_name': 'grpc',
@@ -282,6 +300,13 @@
'src/core/census/operation.c',
'src/core/census/tracing.c',
],
+ "conditions": [
+ ['OS == "mac"', {
+ 'xcode_settings': {
+ 'MACOSX_DEPLOYMENT_TARGET': '10.9'
+ }
+ }]
+ ],
},
{
'include_dirs': [
diff --git a/build.yaml b/build.yaml
index 2717d93..f70ab33 100644
--- a/build.yaml
+++ b/build.yaml
@@ -1937,6 +1937,7 @@
- posix
- name: qps_openloop_test
build: test
+ run: false
language: c++
src:
- test/cpp/qps/qps_openloop_test.cc
@@ -2105,6 +2106,29 @@
- mac
- linux
- posix
+- name: stress_test
+ build: test
+ run: false
+ language: c++
+ headers:
+ - test/cpp/interop/client_helper.h
+ - test/cpp/interop/interop_client.h
+ - test/cpp/interop/stress_interop_client.h
+ src:
+ - test/proto/empty.proto
+ - test/proto/messages.proto
+ - test/proto/test.proto
+ - test/cpp/interop/interop_client.cc
+ - test/cpp/interop/stress_interop_client.cc
+ - test/cpp/interop/stress_test.cc
+ deps:
+ - grpc++_test_util
+ - grpc_test_util
+ - grpc++
+ - grpc
+ - gpr_test_util
+ - gpr
+ - grpc++_test_config
- name: sync_streaming_ping_pong_test
build: test
language: c++
diff --git a/examples/node/greeter_client.js b/examples/node/greeter_client.js
index 175f8e6..e0b89bd 100644
--- a/examples/node/greeter_client.js
+++ b/examples/node/greeter_client.js
@@ -38,7 +38,7 @@
function main() {
var client = new hello_proto.Greeter('localhost:50051',
- grpc.Credentials.createInsecure());
+ grpc.credentials.createInsecure());
var user;
if (process.argv.length >= 3) {
user = process.argv[2];
diff --git a/examples/objective-c/auth_sample/AuthTestService.podspec b/examples/objective-c/auth_sample/AuthTestService.podspec
index 9f2a2cc..9521d49 100644
--- a/examples/objective-c/auth_sample/AuthTestService.podspec
+++ b/examples/objective-c/auth_sample/AuthTestService.podspec
@@ -3,13 +3,13 @@
s.version = "0.0.1"
s.license = "New BSD"
- s.ios.deployment_target = "6.0"
- s.osx.deployment_target = "10.8"
+ s.ios.deployment_target = "7.1"
+ s.osx.deployment_target = "10.9"
# Base directory where the .proto files are.
src = "../../protos"
- # Directory where the generated files will be place.
+ # Directory where the generated files will be placed.
dir = "Pods/" + s.name
# Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients.
@@ -22,14 +22,14 @@
ms.source_files = "#{dir}/*.pbobjc.{h,m}", "#{dir}/**/*.pbobjc.{h,m}"
ms.header_mappings_dir = dir
ms.requires_arc = false
- ms.dependency "Protobuf", "~> 3.0.0-alpha-3"
+ ms.dependency "Protobuf", "~> 3.0.0-alpha-4"
end
s.subspec "Services" do |ss|
ss.source_files = "#{dir}/*.pbrpc.{h,m}", "#{dir}/**/*.pbrpc.{h,m}"
ss.header_mappings_dir = dir
ss.requires_arc = true
- ss.dependency "gRPC", "~> 0.6"
+ ss.dependency "gRPC", "~> 0.11"
ss.dependency "#{s.name}/Messages"
end
end
diff --git a/examples/objective-c/auth_sample/MakeRPCViewController.m b/examples/objective-c/auth_sample/MakeRPCViewController.m
index 366bc9d..4fd23dc 100644
--- a/examples/objective-c/auth_sample/MakeRPCViewController.m
+++ b/examples/objective-c/auth_sample/MakeRPCViewController.m
@@ -35,7 +35,6 @@
#import <AuthTestService/AuthSample.pbrpc.h>
#import <Google/SignIn.h>
-#include <grpc/status.h>
#import <ProtoRPC/ProtoRPC.h>
NSString * const kTestScope = @"https://www.googleapis.com/auth/xapi.zoo";
@@ -49,10 +48,10 @@
@implementation NSError (AuthSample)
- (NSString *)UIDescription {
- if (self.code == GRPC_STATUS_UNAUTHENTICATED) {
+ if (self.code == GRPCErrorCodeUnauthenticated) {
// Authentication error. OAuth2 specifies we'll receive a challenge header.
- // |userInfo[kGRPCStatusMetadataKey]| is the dictionary of response metadata.
- NSString *challengeHeader = self.userInfo[kGRPCStatusMetadataKey][@"www-authenticate"] ?: @"";
+ // |userInfo[kGRPCHeadersKey]| is the dictionary of response headers.
+ NSString *challengeHeader = self.userInfo[kGRPCHeadersKey][@"www-authenticate"] ?: @"";
return [@"Invalid credentials. Server challenge:\n" stringByAppendingString:challengeHeader];
} else {
// Any other error.
@@ -89,7 +88,7 @@
// Set the access token to be used.
NSString *accessToken = GIDSignIn.sharedInstance.currentUser.authentication.accessToken;
- call.requestMetadata[@"Authorization"] = [@"Bearer " stringByAppendingString:accessToken];
+ call.requestHeaders[@"Authorization"] = [@"Bearer " stringByAppendingString:accessToken];
// Start the RPC.
[call start];
diff --git a/examples/objective-c/auth_sample/Podfile b/examples/objective-c/auth_sample/Podfile
index dd4fd55..ea70511 100644
--- a/examples/objective-c/auth_sample/Podfile
+++ b/examples/objective-c/auth_sample/Podfile
@@ -1,6 +1,9 @@
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
+pod 'Protobuf', :path => "../../../third_party/protobuf"
+pod 'gRPC', :path => "../../.."
+
target 'AuthSample' do
# Depend on the generated AuthTestService library.
pod 'AuthTestService', :path => '.'
diff --git a/examples/objective-c/route_guide/Podfile b/examples/objective-c/route_guide/Podfile
index a97f414..efa46bb 100644
--- a/examples/objective-c/route_guide/Podfile
+++ b/examples/objective-c/route_guide/Podfile
@@ -2,6 +2,8 @@
platform :ios, '8.0'
target 'RouteGuideClient' do
+ pod 'Protobuf', :path => "../../../third_party/protobuf"
+ pod 'gRPC', :path => "../../.."
# Depend on the generated RouteGuide library.
pod 'RouteGuide', :path => '.'
end
diff --git a/examples/objective-c/route_guide/RouteGuide.podspec b/examples/objective-c/route_guide/RouteGuide.podspec
index 7b99a6c..e00f827 100644
--- a/examples/objective-c/route_guide/RouteGuide.podspec
+++ b/examples/objective-c/route_guide/RouteGuide.podspec
@@ -3,13 +3,13 @@
s.version = "0.0.1"
s.license = "New BSD"
- s.ios.deployment_target = "6.0"
- s.osx.deployment_target = "10.8"
+ s.ios.deployment_target = "7.1"
+ s.osx.deployment_target = "10.9"
# Base directory where the .proto files are.
src = "../../protos"
- # Directory where the generated files will be place.
+ # Directory where the generated files will be placed.
dir = "Pods/" + s.name
# Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients.
@@ -22,14 +22,14 @@
ms.source_files = "#{dir}/*.pbobjc.{h,m}", "#{dir}/**/*.pbobjc.{h,m}"
ms.header_mappings_dir = dir
ms.requires_arc = false
- ms.dependency "Protobuf", "~> 3.0.0-alpha-3"
+ ms.dependency "Protobuf", "~> 3.0.0-alpha-4"
end
s.subspec "Services" do |ss|
ss.source_files = "#{dir}/*.pbrpc.{h,m}", "#{dir}/**/*.pbrpc.{h,m}"
ss.header_mappings_dir = dir
ss.requires_arc = true
- ss.dependency "gRPC", "~> 0.6"
+ ss.dependency "gRPC", "~> 0.11"
ss.dependency "#{s.name}/Messages"
end
end
diff --git a/gRPC.podspec b/gRPC.podspec
index d101253..2100fc8 100644
--- a/gRPC.podspec
+++ b/gRPC.podspec
@@ -566,8 +566,12 @@
ss.header_mappings_dir = '.'
# This isn't officially supported in Cocoapods. We've asked for an alternative:
# https://github.com/CocoaPods/CocoaPods/issues/4386
- ss.xcconfig = { 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC" ' +
- '"$(PODS_ROOT)/Headers/Private/gRPC/include"' }
+ ss.xcconfig = {
+ 'USE_HEADERMAP' => 'NO',
+ 'ALWAYS_SEARCH_USER_PATHS' => 'NO',
+ 'USER_HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC"',
+ 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC/include"'
+ }
ss.requires_arc = false
ss.libraries = 'z'
diff --git a/include/grpc++/support/byte_buffer.h b/include/grpc++/support/byte_buffer.h
index c413703..9d19b07 100644
--- a/include/grpc++/support/byte_buffer.h
+++ b/include/grpc++/support/byte_buffer.h
@@ -75,7 +75,6 @@
// takes ownership
void set_buffer(grpc_byte_buffer* buf) {
if (buffer_) {
- gpr_log(GPR_ERROR, "Overriding existing buffer");
Clear();
}
buffer_ = buf;
diff --git a/include/grpc++/support/sync_stream.h b/include/grpc++/support/sync_stream.h
index 5143633..daf4e36 100644
--- a/include/grpc++/support/sync_stream.h
+++ b/include/grpc++/support/sync_stream.h
@@ -131,7 +131,7 @@
cq_.Pluck(&ops);
}
- void WaitForInitialMetadata() {
+ void WaitForInitialMetadata() GRPC_OVERRIDE {
GPR_ASSERT(!context_->initial_metadata_received_);
CallOpSet<CallOpRecvInitialMetadata> ops;
@@ -257,7 +257,7 @@
cq_.Pluck(&ops);
}
- void WaitForInitialMetadata() {
+ void WaitForInitialMetadata() GRPC_OVERRIDE {
GPR_ASSERT(!context_->initial_metadata_received_);
CallOpSet<CallOpRecvInitialMetadata> ops;
diff --git a/package.json b/package.json
index 54efb69..1fd0ffb 100644
--- a/package.json
+++ b/package.json
@@ -38,6 +38,7 @@
"jshint": "^2.5.0",
"minimist": "^1.1.0",
"mocha": "~1.21.0",
+ "mocha-jenkins-reporter": "^0.1.9",
"mustache": "^2.0.0"
},
"engines": {
diff --git a/src/core/channel/client_uchannel.c b/src/core/channel/client_uchannel.c
index fee0c54..510677a 100644
--- a/src/core/channel/client_uchannel.c
+++ b/src/core/channel/client_uchannel.c
@@ -462,7 +462,7 @@
grpc_subchannel_state_change_unsubscribe(exec_ctx, chand->subchannel,
&chand->connectivity_cb);
grpc_connectivity_state_destroy(exec_ctx, &chand->state_tracker);
- gpr_mu_lock(&chand->mu_state);
+ gpr_mu_destroy(&chand->mu_state);
}
const grpc_channel_filter grpc_client_uchannel_filter = {
diff --git a/src/csharp/.gitignore b/src/csharp/.gitignore
index deac550..0f96a48 100644
--- a/src/csharp/.gitignore
+++ b/src/csharp/.gitignore
@@ -7,6 +7,7 @@
Grpc.sdf
TestResult.xml
+coverage_results.xml
/TestResults
.vs/
*.nupkg
diff --git a/src/csharp/.nuget/packages.config b/src/csharp/.nuget/packages.config
index a7df95c..89a310a 100644
--- a/src/csharp/.nuget/packages.config
+++ b/src/csharp/.nuget/packages.config
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit.Runners" version="2.6.4" />
+ <package id="OpenCover" version="4.6.166" />
+ <package id="ReportGenerator" version="2.3.2.0" />
</packages>
\ No newline at end of file
diff --git a/src/objective-c/GRPCClient/GRPCCall+OAuth2.h b/src/objective-c/GRPCClient/GRPCCall+OAuth2.h
index 2e379a7..6b44387 100644
--- a/src/objective-c/GRPCClient/GRPCCall+OAuth2.h
+++ b/src/objective-c/GRPCClient/GRPCCall+OAuth2.h
@@ -33,17 +33,19 @@
#import "GRPCCall.h"
-// Helpers for setting and reading headers compatible with OAuth2.
+/** Helpers for setting and reading headers compatible with OAuth2. */
@interface GRPCCall (OAuth2)
-// Setting this property is equivalent to setting "Bearer <passed token>" as the value of the
-// request header with key "authorization" (the authorization header). Setting it to nil removes the
-// authorization header from the request.
-// The value obtained by getting the property is the OAuth2 bearer token if the authorization header
-// of the request has the form "Bearer <token>", or nil otherwise.
+/**
+ * Setting this property is equivalent to setting "Bearer <passed token>" as the value of the
+ * request header with key "authorization" (the authorization header). Setting it to nil removes the
+ * authorization header from the request.
+ * The value obtained by getting the property is the OAuth2 bearer token if the authorization header
+ * of the request has the form "Bearer <token>", or nil otherwise.
+ */
@property(atomic, copy) NSString *oauth2AccessToken;
-// Returns the value (if any) of the "www-authenticate" response header (the challenge header).
+/** Returns the value (if any) of the "www-authenticate" response header (the challenge header). */
@property(atomic, readonly) NSString *oauth2ChallengeHeader;
@end
diff --git a/src/objective-c/GRPCClient/GRPCCall+Tests.h b/src/objective-c/GRPCClient/GRPCCall+Tests.h
index cca1614..ccc5723 100644
--- a/src/objective-c/GRPCClient/GRPCCall+Tests.h
+++ b/src/objective-c/GRPCClient/GRPCCall+Tests.h
@@ -33,22 +33,28 @@
#import "GRPCCall.h"
-// Methods to let tune down the security of gRPC connections for specific hosts. These shouldn't be
-// used in releases, but are sometimes needed for testing.
+/**
+ * Methods to let tune down the security of gRPC connections for specific hosts. These shouldn't be
+ * used in releases, but are sometimes needed for testing.
+ */
@interface GRPCCall (Tests)
-// Establish all SSL connections to the provided host using the passed SSL target name and the root
-// certificates found in the file at |certsPath|.
-//
-// Must be called before any gRPC call to that host is made. It's illegal to pass the same host to
-// more than one invocation of the methods of this category.
+/**
+ * Establish all SSL connections to the provided host using the passed SSL target name and the root
+ * certificates found in the file at |certsPath|.
+ *
+ * Must be called before any gRPC call to that host is made. It's illegal to pass the same host to
+ * more than one invocation of the methods of this category.
+ */
+ (void)useTestCertsPath:(NSString *)certsPath
testName:(NSString *)testName
forHost:(NSString *)host;
-// Establish all connections to the provided host using cleartext instead of SSL.
-//
-// Must be called before any gRPC call to that host is made. It's illegal to pass the same host to
-// more than one invocation of the methods of this category.
+/**
+ * Establish all connections to the provided host using cleartext instead of SSL.
+ *
+ * Must be called before any gRPC call to that host is made. It's illegal to pass the same host to
+ * more than one invocation of the methods of this category.
+ */
+ (void)useInsecureConnectionsForHost:(NSString *)host;
@end
diff --git a/src/objective-c/GRPCClient/GRPCCall+Tests.m b/src/objective-c/GRPCClient/GRPCCall+Tests.m
index bade0b2..c8e8133 100644
--- a/src/objective-c/GRPCClient/GRPCCall+Tests.m
+++ b/src/objective-c/GRPCClient/GRPCCall+Tests.m
@@ -40,6 +40,9 @@
+ (void)useTestCertsPath:(NSString *)certsPath
testName:(NSString *)testName
forHost:(NSString *)host {
+ if (!host || !certsPath || !testName) {
+ [NSException raise:NSInvalidArgumentException format:@"host, path and name must be provided."];
+ }
GRPCHost *hostConfig = [GRPCHost hostWithAddress:host];
hostConfig.pathToCertificates = certsPath;
hostConfig.hostNameOverride = testName;
diff --git a/src/objective-c/GRPCClient/GRPCCall.h b/src/objective-c/GRPCClient/GRPCCall.h
index 35f7e16..5918f88 100644
--- a/src/objective-c/GRPCClient/GRPCCall.h
+++ b/src/objective-c/GRPCClient/GRPCCall.h
@@ -31,117 +31,145 @@
*
*/
-// The gRPC protocol is an RPC protocol on top of HTTP2.
-//
-// While the most common type of RPC receives only one request message and returns only one response
-// message, the protocol also supports RPCs that return multiple individual messages in a streaming
-// fashion, RPCs that accept a stream of request messages, or RPCs with both streaming requests and
-// responses.
-//
-// Conceptually, each gRPC call consists of a bidirectional stream of binary messages, with RPCs of
-// the "non-streaming type" sending only one message in the corresponding direction (the protocol
-// doesn't make any distinction).
-//
-// Each RPC uses a different HTTP2 stream, and thus multiple simultaneous RPCs can be multiplexed
-// transparently on the same TCP connection.
+/**
+ * The gRPC protocol is an RPC protocol on top of HTTP2.
+ *
+ * While the most common type of RPC receives only one request message and returns only one response
+ * message, the protocol also supports RPCs that return multiple individual messages in a streaming
+ * fashion, RPCs that accept a stream of request messages, or RPCs with both streaming requests and
+ * responses.
+ *
+ * Conceptually, each gRPC call consists of a bidirectional stream of binary messages, with RPCs of
+ * the "non-streaming type" sending only one message in the corresponding direction (the protocol
+ * doesn't make any distinction).
+ *
+ * Each RPC uses a different HTTP2 stream, and thus multiple simultaneous RPCs can be multiplexed
+ * transparently on the same TCP connection.
+ */
#import <Foundation/Foundation.h>
#import <RxLibrary/GRXWriter.h>
#pragma mark gRPC errors
-// Domain of NSError objects produced by gRPC.
+/** Domain of NSError objects produced by gRPC. */
extern NSString *const kGRPCErrorDomain;
-// gRPC error codes.
-// Note that a few of these are never produced by the gRPC libraries, but are of general utility for
-// server applications to produce.
+/**
+ * gRPC error codes.
+ * Note that a few of these are never produced by the gRPC libraries, but are of general utility for
+ * server applications to produce.
+ */
typedef NS_ENUM(NSUInteger, GRPCErrorCode) {
- // The operation was cancelled (typically by the caller).
+ /** The operation was cancelled (typically by the caller). */
GRPCErrorCodeCancelled = 1,
- // Unknown error. Errors raised by APIs that do not return enough error information may be
- // converted to this error.
+ /**
+ * Unknown error. Errors raised by APIs that do not return enough error information may be
+ * converted to this error.
+ */
GRPCErrorCodeUnknown = 2,
- // The client specified an invalid argument. Note that this differs from FAILED_PRECONDITION.
- // INVALID_ARGUMENT indicates arguments that are problematic regardless of the state of the
- // server (e.g., a malformed file name).
+ /**
+ * The client specified an invalid argument. Note that this differs from FAILED_PRECONDITION.
+ * INVALID_ARGUMENT indicates arguments that are problematic regardless of the state of the
+ * server (e.g., a malformed file name).
+ */
GRPCErrorCodeInvalidArgument = 3,
- // Deadline expired before operation could complete. For operations that change the state of the
- // server, this error may be returned even if the operation has completed successfully. For
- // example, a successful response from the server could have been delayed long enough for the
- // deadline to expire.
+ /**
+ * Deadline expired before operation could complete. For operations that change the state of the
+ * server, this error may be returned even if the operation has completed successfully. For
+ * example, a successful response from the server could have been delayed long enough for the
+ * deadline to expire.
+ */
GRPCErrorCodeDeadlineExceeded = 4,
- // Some requested entity (e.g., file or directory) was not found.
+ /** Some requested entity (e.g., file or directory) was not found. */
GRPCErrorCodeNotFound = 5,
- // Some entity that we attempted to create (e.g., file or directory) already exists.
+ /** Some entity that we attempted to create (e.g., file or directory) already exists. */
GRPCErrorCodeAlreadyExists = 6,
- // The caller does not have permission to execute the specified operation. PERMISSION_DENIED isn't
- // used for rejections caused by exhausting some resource (RESOURCE_EXHAUSTED is used instead for
- // those errors). PERMISSION_DENIED doesn't indicate a failure to identify the caller
- // (UNAUTHENTICATED is used instead for those errors).
+ /**
+ * The caller does not have permission to execute the specified operation. PERMISSION_DENIED isn't
+ * used for rejections caused by exhausting some resource (RESOURCE_EXHAUSTED is used instead for
+ * those errors). PERMISSION_DENIED doesn't indicate a failure to identify the caller
+ * (UNAUTHENTICATED is used instead for those errors).
+ */
GRPCErrorCodePermissionDenied = 7,
- // The request does not have valid authentication credentials for the operation (e.g. the caller's
- // identity can't be verified).
+ /**
+ * The request does not have valid authentication credentials for the operation (e.g. the caller's
+ * identity can't be verified).
+ */
GRPCErrorCodeUnauthenticated = 16,
- // Some resource has been exhausted, perhaps a per-user quota.
+ /** Some resource has been exhausted, perhaps a per-user quota. */
GRPCErrorCodeResourceExhausted = 8,
- // The RPC was rejected because the server is not in a state required for the procedure's
- // execution. For example, a directory to be deleted may be non-empty, etc.
- // The client should not retry until the server state has been explicitly fixed (e.g. by
- // performing another RPC). The details depend on the service being called, and should be found in
- // the NSError's userInfo.
+ /**
+ * The RPC was rejected because the server is not in a state required for the procedure's
+ * execution. For example, a directory to be deleted may be non-empty, etc.
+ * The client should not retry until the server state has been explicitly fixed (e.g. by
+ * performing another RPC). The details depend on the service being called, and should be found in
+ * the NSError's userInfo.
+ */
GRPCErrorCodeFailedPrecondition = 9,
- // The RPC was aborted, typically due to a concurrency issue like sequencer check failures,
- // transaction aborts, etc. The client should retry at a higher-level (e.g., restarting a read-
- // modify-write sequence).
+ /**
+ * The RPC was aborted, typically due to a concurrency issue like sequencer check failures,
+ * transaction aborts, etc. The client should retry at a higher-level (e.g., restarting a read-
+ * modify-write sequence).
+ */
GRPCErrorCodeAborted = 10,
- // The RPC was attempted past the valid range. E.g., enumerating past the end of a list.
- // Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed if the system state
- // changes. For example, an RPC to get elements of a list will generate INVALID_ARGUMENT if asked
- // to return the element at a negative index, but it will generate OUT_OF_RANGE if asked to return
- // the element at an index past the current size of the list.
+ /**
+ * The RPC was attempted past the valid range. E.g., enumerating past the end of a list.
+ * Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed if the system state
+ * changes. For example, an RPC to get elements of a list will generate INVALID_ARGUMENT if asked
+ * to return the element at a negative index, but it will generate OUT_OF_RANGE if asked to return
+ * the element at an index past the current size of the list.
+ */
GRPCErrorCodeOutOfRange = 11,
- // The procedure is not implemented or not supported/enabled in this server.
+ /** The procedure is not implemented or not supported/enabled in this server. */
GRPCErrorCodeUnimplemented = 12,
- // Internal error. Means some invariant expected by the server application or the gRPC library has
- // been broken.
+ /**
+ * Internal error. Means some invariant expected by the server application or the gRPC library has
+ * been broken.
+ */
GRPCErrorCodeInternal = 13,
- // The server is currently unavailable. This is most likely a transient condition and may be
- // corrected by retrying with a backoff.
+ /**
+ * The server is currently unavailable. This is most likely a transient condition and may be
+ * corrected by retrying with a backoff.
+ */
GRPCErrorCodeUnavailable = 14,
- // Unrecoverable data loss or corruption.
+ /** Unrecoverable data loss or corruption. */
GRPCErrorCodeDataLoss = 15,
};
-// Keys used in |NSError|'s |userInfo| dictionary to store the response headers and trailers sent by
-// the server.
+/**
+ * Keys used in |NSError|'s |userInfo| dictionary to store the response headers and trailers sent by
+ * the server.
+ */
extern id const kGRPCHeadersKey;
extern id const kGRPCTrailersKey;
#pragma mark GRPCCall
-// The container of the request headers of an RPC conforms to this protocol, which is a subset of
-// NSMutableDictionary's interface. It will become a NSMutableDictionary later on.
-// The keys of this container are the header names, which per the HTTP standard are case-
-// insensitive. They are stored in lowercase (which is how HTTP/2 mandates them on the wire), and
-// can only consist of ASCII characters.
-// A header value is a NSString object (with only ASCII characters), unless the header name has the
-// suffix "-bin", in which case the value has to be a NSData object.
+/**
+ * The container of the request headers of an RPC conforms to this protocol, which is a subset of
+ * NSMutableDictionary's interface. It will become a NSMutableDictionary later on.
+ * The keys of this container are the header names, which per the HTTP standard are case-
+ * insensitive. They are stored in lowercase (which is how HTTP/2 mandates them on the wire), and
+ * can only consist of ASCII characters.
+ * A header value is a NSString object (with only ASCII characters), unless the header name has the
+ * suffix "-bin", in which case the value has to be a NSData object.
+ */
@protocol GRPCRequestHeaders <NSObject>
@property(nonatomic, readonly) NSUInteger count;
@@ -154,53 +182,63 @@
@end
-// Represents a single gRPC remote call.
+/** Represents a single gRPC remote call. */
@interface GRPCCall : GRXWriter
-// These HTTP headers will be passed to the server as part of this call. Each HTTP header is a
-// name-value pair with string names and either string or binary values.
-//
-// The passed dictionary has to use NSString keys, corresponding to the header names. The value
-// associated to each can be a NSString object or a NSData object. E.g.:
-//
-// call.requestHeaders = @{@"authorization": @"Bearer ..."};
-//
-// call.requestHeaders[@"my-header-bin"] = someData;
-//
-// After the call is started, trying to modify this property is an error.
-//
-// The property is initialized to an empty NSMutableDictionary.
+/**
+ * These HTTP headers will be passed to the server as part of this call. Each HTTP header is a
+ * name-value pair with string names and either string or binary values.
+ *
+ * The passed dictionary has to use NSString keys, corresponding to the header names. The value
+ * associated to each can be a NSString object or a NSData object. E.g.:
+ *
+ * call.requestHeaders = @{@"authorization": @"Bearer ..."};
+ *
+ * call.requestHeaders[@"my-header-bin"] = someData;
+ *
+ * After the call is started, trying to modify this property is an error.
+ *
+ * The property is initialized to an empty NSMutableDictionary.
+ */
@property(atomic, readonly) id<GRPCRequestHeaders> requestHeaders;
-// This dictionary is populated with the HTTP headers received from the server. This happens before
-// any response message is received from the server. It has the same structure as the request
-// headers dictionary: Keys are NSString header names; names ending with the suffix "-bin" have a
-// NSData value; the others have a NSString value.
-//
-// The value of this property is nil until all response headers are received, and will change before
-// any of -writeValue: or -writesFinishedWithError: are sent to the writeable.
+/**
+ * This dictionary is populated with the HTTP headers received from the server. This happens before
+ * any response message is received from the server. It has the same structure as the request
+ * headers dictionary: Keys are NSString header names; names ending with the suffix "-bin" have a
+ * NSData value; the others have a NSString value.
+ *
+ * The value of this property is nil until all response headers are received, and will change before
+ * any of -writeValue: or -writesFinishedWithError: are sent to the writeable.
+ */
@property(atomic, readonly) NSDictionary *responseHeaders;
-// Same as responseHeaders, but populated with the HTTP trailers received from the server before the
-// call finishes.
-//
-// The value of this property is nil until all response trailers are received, and will change
-// before -writesFinishedWithError: is sent to the writeable.
+/**
+ * Same as responseHeaders, but populated with the HTTP trailers received from the server before the
+ * call finishes.
+ *
+ * The value of this property is nil until all response trailers are received, and will change
+ * before -writesFinishedWithError: is sent to the writeable.
+ */
@property(atomic, readonly) NSDictionary *responseTrailers;
-// The request writer has to write NSData objects into the provided Writeable. The server will
-// receive each of those separately and in order as distinct messages.
-// A gRPC call might not complete until the request writer finishes. On the other hand, the request
-// finishing doesn't necessarily make the call to finish, as the server might continue sending
-// messages to the response side of the call indefinitely (depending on the semantics of the
-// specific remote method called).
-// To finish a call right away, invoke cancel.
+/**
+ * The request writer has to write NSData objects into the provided Writeable. The server will
+ * receive each of those separately and in order as distinct messages.
+ * A gRPC call might not complete until the request writer finishes. On the other hand, the request
+ * finishing doesn't necessarily make the call to finish, as the server might continue sending
+ * messages to the response side of the call indefinitely (depending on the semantics of the
+ * specific remote method called).
+ * To finish a call right away, invoke cancel.
+ */
- (instancetype)initWithHost:(NSString *)host
path:(NSString *)path
requestsWriter:(GRXWriter *)requestsWriter NS_DESIGNATED_INITIALIZER;
-// Finishes the request side of this call, notifies the server that the RPC should be cancelled, and
-// finishes the response side of the call with an error of code CANCELED.
+/**
+ * Finishes the request side of this call, notifies the server that the RPC should be cancelled, and
+ * finishes the response side of the call with an error of code CANCELED.
+ */
- (void)cancel;
// TODO(jcanizales): Let specify a deadline. As a category of GRXWriter?
diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.h b/src/objective-c/GRPCClient/private/GRPCChannel.h
index 2a7b701..e2d19d5 100644
--- a/src/objective-c/GRPCClient/private/GRPCChannel.h
+++ b/src/objective-c/GRPCClient/private/GRPCChannel.h
@@ -35,12 +35,16 @@
struct grpc_channel;
-// Each separate instance of this class represents at least one TCP connection to the provided host.
-// Create them using one of the subclasses |GRPCSecureChannel| and |GRPCUnsecuredChannel|.
+/**
+ * Each separate instance of this class represents at least one TCP connection to the provided host.
+ * Create them using one of the subclasses |GRPCSecureChannel| and |GRPCUnsecuredChannel|.
+ */
@interface GRPCChannel : NSObject
@property(nonatomic, readonly) struct grpc_channel *unmanagedChannel;
-// This initializer takes ownership of the passed channel, and will destroy it when this object is
-// deallocated. It's illegal to pass the same grpc_channel to two different GRPCChannel objects.
+/**
+ * This initializer takes ownership of the passed channel, and will destroy it when this object is
+ * deallocated. It's illegal to pass the same grpc_channel to two different GRPCChannel objects.
+ */
- (instancetype)initWithChannel:(struct grpc_channel *)unmanagedChannel NS_DESIGNATED_INITIALIZER;
@end
diff --git a/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h
index ab8d714..fe3b8f3 100644
--- a/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h
+++ b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h
@@ -36,15 +36,17 @@
typedef void(^GRPCQueueCompletionHandler)(bool success);
-// This class lets one more easily use |grpc_completion_queue|. To use it, pass the value of the
-// |unmanagedQueue| property of an instance of this class to |grpc_channel_create_call|. Then for
-// every |grpc_call_*| method that accepts a tag, you can pass a block of type
-// |GRPCQueueCompletionHandler| (remembering to cast it using |__bridge_retained|). The block is
-// guaranteed to eventually be called, by a concurrent queue, and then released. Each such block is
-// passed a |bool| that tells if the operation was successful.
-//
-// Release the GRPCCompletionQueue object only after you are not going to pass any more blocks to
-// the |grpc_call| that's using it.
+/**
+ * This class lets one more easily use |grpc_completion_queue|. To use it, pass the value of the
+ * |unmanagedQueue| property of an instance of this class to |grpc_channel_create_call|. Then for
+ * every |grpc_call_*| method that accepts a tag, you can pass a block of type
+ * |GRPCQueueCompletionHandler| (remembering to cast it using |__bridge_retained|). The block is
+ * guaranteed to eventually be called, by a concurrent queue, and then released. Each such block is
+ * passed a |bool| that tells if the operation was successful.
+ *
+ * Release the GRPCCompletionQueue object only after you are not going to pass any more blocks to
+ * the |grpc_call| that's using it.
+ */
@interface GRPCCompletionQueue : NSObject
@property(nonatomic, readonly) grpc_completion_queue *unmanagedQueue;
diff --git a/src/objective-c/GRPCClient/private/GRPCHost.h b/src/objective-c/GRPCClient/private/GRPCHost.h
index f0bbd53..6b4f987 100644
--- a/src/objective-c/GRPCClient/private/GRPCHost.h
+++ b/src/objective-c/GRPCClient/private/GRPCHost.h
@@ -40,18 +40,18 @@
@property(nonatomic, readonly) NSString *address;
-// The following properties should only be modified for testing:
+/** The following properties should only be modified for testing: */
@property(nonatomic, getter=isSecure) BOOL secure;
@property(nonatomic, copy) NSString *pathToCertificates;
@property(nonatomic, copy) NSString *hostNameOverride;
-// Host objects initialized with the same address are the same.
+/** Host objects initialized with the same address are the same. */
+ (instancetype)hostWithAddress:(NSString *)address;
- (instancetype)initWithAddress:(NSString *)address NS_DESIGNATED_INITIALIZER;
-// Create a grpc_call object to the provided path on this host.
+/** Create a grpc_call object to the provided path on this host. */
- (struct grpc_call *)unmanagedCallWithPath:(NSString *)path
completionQueue:(GRPCCompletionQueue *)queue;
diff --git a/src/objective-c/GRPCClient/private/GRPCSecureChannel.h b/src/objective-c/GRPCClient/private/GRPCSecureChannel.h
index 74257eb..4e0881e 100644
--- a/src/objective-c/GRPCClient/private/GRPCSecureChannel.h
+++ b/src/objective-c/GRPCClient/private/GRPCSecureChannel.h
@@ -40,13 +40,15 @@
@interface GRPCSecureChannel : GRPCChannel
- (instancetype)initWithHost:(NSString *)host;
-// Only in tests shouldn't pathToCertificates or hostNameOverride be nil. Passing nil for
-// pathToCertificates results in using the default root certificates distributed with the library.
+/**
+ * Only in tests shouldn't pathToCertificates or hostNameOverride be nil. Passing nil for
+ * pathToCertificates results in using the default root certificates distributed with the library.
+ */
- (instancetype)initWithHost:(NSString *)host
pathToCertificates:(NSString *)path
hostNameOverride:(NSString *)hostNameOverride;
-// The passed arguments aren't required to be valid beyond the invocation of this initializer.
+/** The passed arguments aren't required to be valid beyond the invocation of this initializer. */
- (instancetype)initWithHost:(NSString *)host
credentials:(struct grpc_credentials *)credentials
args:(grpc_channel_args *)args NS_DESIGNATED_INITIALIZER;
diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.h b/src/objective-c/GRPCClient/private/GRPCWrappedCall.h
index 4ca2766..7747aa5 100644
--- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.h
+++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.h
@@ -39,7 +39,7 @@
@interface GRPCOperation : NSObject
@property(nonatomic, readonly) grpc_op op;
-// Guaranteed to be called when the operation has finished.
+/** Guaranteed to be called when the operation has finished. */
- (void)finish;
@end
diff --git a/src/objective-c/GRPCClient/private/NSError+GRPC.h b/src/objective-c/GRPCClient/private/NSError+GRPC.h
index f4729dc..e0c1efc 100644
--- a/src/objective-c/GRPCClient/private/NSError+GRPC.h
+++ b/src/objective-c/GRPCClient/private/NSError+GRPC.h
@@ -35,7 +35,9 @@
#include <grpc/grpc.h>
@interface NSError (GRPC)
-// Returns nil if the status code is OK. Otherwise, a NSError whose code is one of |GRPCErrorCode|
-// and whose domain is |kGRPCErrorDomain|.
+/**
+ * Returns nil if the status code is OK. Otherwise, a NSError whose code is one of |GRPCErrorCode|
+ * and whose domain is |kGRPCErrorDomain|.
+ */
+ (instancetype)grpc_errorFromStatusCode:(grpc_status_code)statusCode details:(char *)details;
@end
diff --git a/src/objective-c/ProtoRPC/ProtoMethod.h b/src/objective-c/ProtoRPC/ProtoMethod.h
index 8f554a0..a0ed2cf 100644
--- a/src/objective-c/ProtoRPC/ProtoMethod.h
+++ b/src/objective-c/ProtoRPC/ProtoMethod.h
@@ -33,8 +33,10 @@
#import <Foundation/Foundation.h>
-// A fully-qualified proto service method name. Full qualification is needed because a gRPC endpoint
-// can implement multiple services.
+/**
+ * A fully-qualified proto service method name. Full qualification is needed because a gRPC endpoint
+ * can implement multiple services.
+ */
@interface ProtoMethod : NSObject
@property(nonatomic, readonly) NSString *package;
@property(nonatomic, readonly) NSString *service;
diff --git a/src/objective-c/RxLibrary/GRXBufferedPipe.h b/src/objective-c/RxLibrary/GRXBufferedPipe.h
index ca94ce2..03b0359 100644
--- a/src/objective-c/RxLibrary/GRXBufferedPipe.h
+++ b/src/objective-c/RxLibrary/GRXBufferedPipe.h
@@ -36,25 +36,27 @@
#import "GRXWriteable.h"
#import "GRXWriter.h"
-// A buffered pipe is a Writer that also acts as a Writeable.
-// Once it is started, whatever values are written into it (via -writeValue:) will be propagated
-// immediately, unless flow control prevents it.
-// If it is throttled and keeps receiving values, as well as if it receives values before being
-// started, it will buffer them and propagate them in order as soon as its state becomes Started.
-// If it receives an error (via -writesFinishedWithError:), it will drop any buffered values and
-// propagate the error immediately.
-//
-// Beware that a pipe of this type can't prevent receiving more values when it is paused (for
-// example if used to write data to a congested network connection). Because in such situations the
-// pipe will keep buffering all data written to it, your application could run out of memory and
-// crash. If you want to react to flow control signals to prevent that, instead of using this class
-// you can implement an object that conforms to GRXWriter.
-//
-// Thread-safety:
-// The methods of an object of this class should not be called concurrently from different threads.
+/**
+ * A buffered pipe is a Writer that also acts as a Writeable.
+ * Once it is started, whatever values are written into it (via -writeValue:) will be propagated
+ * immediately, unless flow control prevents it.
+ * If it is throttled and keeps receiving values, as well as if it receives values before being
+ * started, it will buffer them and propagate them in order as soon as its state becomes Started.
+ * If it receives an error (via -writesFinishedWithError:), it will drop any buffered values and
+ * propagate the error immediately.
+ *
+ * Beware that a pipe of this type can't prevent receiving more values when it is paused (for
+ * example if used to write data to a congested network connection). Because in such situations the
+ * pipe will keep buffering all data written to it, your application could run out of memory and
+ * crash. If you want to react to flow control signals to prevent that, instead of using this class
+ * you can implement an object that conforms to GRXWriter.
+ *
+ * Thread-safety:
+ * The methods of an object of this class should not be called concurrently from different threads.
+ */
@interface GRXBufferedPipe : GRXWriter<GRXWriteable>
-// Convenience constructor.
+/** Convenience constructor. */
+ (instancetype)pipe;
@end
diff --git a/src/objective-c/RxLibrary/GRXConcurrentWriteable.h b/src/objective-c/RxLibrary/GRXConcurrentWriteable.h
index 1080001..b2775f9 100644
--- a/src/objective-c/RxLibrary/GRXConcurrentWriteable.h
+++ b/src/objective-c/RxLibrary/GRXConcurrentWriteable.h
@@ -36,36 +36,48 @@
#import "GRXWriter.h"
#import "GRXWriteable.h"
-// This is a thread-safe wrapper over a GRXWriteable instance. It lets one enqueue calls to a
-// GRXWriteable instance for the main thread, guaranteeing that writesFinishedWithError: is the last
-// message sent to it (no matter what messages are sent to the wrapper, in what order, nor from
-// which thread). It also guarantees that, if cancelWithError: is called from the main thread (e.g.
-// by the app cancelling the writes), no further messages are sent to the writeable except
-// writesFinishedWithError:.
-//
-// TODO(jcanizales): Let the user specify another queue for the writeable callbacks.
+/**
+ * This is a thread-safe wrapper over a GRXWriteable instance. It lets one enqueue calls to a
+ * GRXWriteable instance for the main thread, guaranteeing that writesFinishedWithError: is the last
+ * message sent to it (no matter what messages are sent to the wrapper, in what order, nor from
+ * which thread). It also guarantees that, if cancelWithError: is called from the main thread (e.g.
+ * by the app cancelling the writes), no further messages are sent to the writeable except
+ * writesFinishedWithError:.
+ *
+ * TODO(jcanizales): Let the user specify another queue for the writeable callbacks.
+ */
@interface GRXConcurrentWriteable : NSObject
-// The GRXWriteable passed is the wrapped writeable.
-// The GRXWriteable instance is retained until writesFinishedWithError: is sent to it, and released
-// after that.
+/**
+ * The GRXWriteable passed is the wrapped writeable.
+ * The GRXWriteable instance is retained until writesFinishedWithError: is sent to it, and released
+ * after that.
+ */
- (instancetype)initWithWriteable:(id<GRXWriteable>)writeable NS_DESIGNATED_INITIALIZER;
-// Enqueues writeValue: to be sent to the writeable in the main thread.
-// The passed handler is invoked from the main thread after writeValue: returns.
+/**
+ * Enqueues writeValue: to be sent to the writeable in the main thread.
+ * The passed handler is invoked from the main thread after writeValue: returns.
+ */
- (void)enqueueValue:(id)value completionHandler:(void (^)())handler;
-// Enqueues writesFinishedWithError:nil to be sent to the writeable in the main thread. After that
-// message is sent to the writeable, all other methods of this object are effectively noops.
+/**
+ * Enqueues writesFinishedWithError:nil to be sent to the writeable in the main thread. After that
+ * message is sent to the writeable, all other methods of this object are effectively noops.
+ */
- (void)enqueueSuccessfulCompletion;
-// If the writeable has not yet received a writesFinishedWithError: message, this will enqueue one
-// to be sent to it in the main thread, and cancel all other pending messages to the writeable
-// enqueued by this object (both past and future).
-// The error argument cannot be nil.
+/**
+ * If the writeable has not yet received a writesFinishedWithError: message, this will enqueue one
+ * to be sent to it in the main thread, and cancel all other pending messages to the writeable
+ * enqueued by this object (both past and future).
+ * The error argument cannot be nil.
+ */
- (void)cancelWithError:(NSError *)error;
-// Cancels all pending messages to the writeable enqueued by this object (both past and future).
-// Because the writeable won't receive writesFinishedWithError:, this also releases the writeable.
+/**
+ * Cancels all pending messages to the writeable enqueued by this object (both past and future).
+ * Because the writeable won't receive writesFinishedWithError:, this also releases the writeable.
+ */
- (void)cancelSilently;
@end
diff --git a/src/objective-c/RxLibrary/GRXForwardingWriter.h b/src/objective-c/RxLibrary/GRXForwardingWriter.h
index f310832..8d45b8e 100644
--- a/src/objective-c/RxLibrary/GRXForwardingWriter.h
+++ b/src/objective-c/RxLibrary/GRXForwardingWriter.h
@@ -33,17 +33,19 @@
#import "GRXWriter.h"
-// A "proxy" class that simply forwards values, completion, and errors from its input writer to its
-// writeable.
-// It is useful as a superclass for pipes that act as a transformation of their
-// input writer, and for classes that represent objects with input and
-// output sequences of values, like an RPC.
-//
-// Thread-safety:
-// All messages sent to this object need to be serialized. When it is started, the writer it wraps
-// is started in the same thread. Manual state changes are propagated to the wrapped writer in the
-// same thread too. Importantly, all messages the wrapped writer sends to its writeable need to be
-// serialized with any message sent to this object.
+/**
+ * A "proxy" class that simply forwards values, completion, and errors from its input writer to its
+ * writeable.
+ * It is useful as a superclass for pipes that act as a transformation of their
+ * input writer, and for classes that represent objects with input and
+ * output sequences of values, like an RPC.
+ *
+ * Thread-safety:
+ * All messages sent to this object need to be serialized. When it is started, the writer it wraps
+ * is started in the same thread. Manual state changes are propagated to the wrapped writer in the
+ * same thread too. Importantly, all messages the wrapped writer sends to its writeable need to be
+ * serialized with any message sent to this object.
+ */
@interface GRXForwardingWriter : GRXWriter
- (instancetype)initWithWriter:(GRXWriter *)writer NS_DESIGNATED_INITIALIZER;
@end
diff --git a/src/objective-c/RxLibrary/GRXImmediateWriter.h b/src/objective-c/RxLibrary/GRXImmediateWriter.h
index 3fcc259..e22b056 100644
--- a/src/objective-c/RxLibrary/GRXImmediateWriter.h
+++ b/src/objective-c/RxLibrary/GRXImmediateWriter.h
@@ -35,46 +35,60 @@
#import "GRXWriter.h"
-// Utility to construct GRXWriter instances from values that are immediately available when
-// required.
-//
-// Thread-safety:
-//
-// An object of this class shouldn't be messaged concurrently by more than one thread. It will start
-// messaging the writeable before |startWithWriteable:| returns, in the same thread. That is the
-// only place where the writer can be paused or stopped prematurely.
-//
-// If a paused writer of this class is resumed, it will start messaging the writeable, in the same
-// thread, before |setState:| returns. Because the object can't be legally accessed concurrently,
-// that's the only place where it can be paused again (or stopped).
+/**
+ * Utility to construct GRXWriter instances from values that are immediately available when
+ * required.
+ *
+ * Thread-safety:
+ *
+ * An object of this class shouldn't be messaged concurrently by more than one thread. It will start
+ * messaging the writeable before |startWithWriteable:| returns, in the same thread. That is the
+ * only place where the writer can be paused or stopped prematurely.
+ *
+ * If a paused writer of this class is resumed, it will start messaging the writeable, in the same
+ * thread, before |setState:| returns. Because the object can't be legally accessed concurrently,
+ * that's the only place where it can be paused again (or stopped).
+ */
@interface GRXImmediateWriter : GRXWriter
-// Returns a writer that pulls values from the passed NSEnumerator instance and pushes them to
-// its writeable. The NSEnumerator is released when it finishes.
+/**
+ * Returns a writer that pulls values from the passed NSEnumerator instance and pushes them to
+ * its writeable. The NSEnumerator is released when it finishes.
+ */
+ (GRXWriter *)writerWithEnumerator:(NSEnumerator *)enumerator;
-// Returns a writer that pushes to its writeable the successive values returned by the passed
-// block. When the block first returns nil, it is released.
+/**
+ * Returns a writer that pushes to its writeable the successive values returned by the passed
+ * block. When the block first returns nil, it is released.
+ */
+ (GRXWriter *)writerWithValueSupplier:(id (^)())block;
-// Returns a writer that iterates over the values of the passed container and pushes them to
-// its writeable. The container is released when the iteration is over.
-//
-// Note that the usual speed gain of NSFastEnumeration over NSEnumerator results from not having to
-// call one method per element. Because GRXWriteable instances accept values one by one, that speed
-// gain doesn't happen here.
+/**
+ * Returns a writer that iterates over the values of the passed container and pushes them to
+ * its writeable. The container is released when the iteration is over.
+ *
+ * Note that the usual speed gain of NSFastEnumeration over NSEnumerator results from not having to
+ * call one method per element. Because GRXWriteable instances accept values one by one, that speed
+ * gain doesn't happen here.
+ */
+ (GRXWriter *)writerWithContainer:(id<NSFastEnumeration>)container;
-// Returns a writer that sends the passed value to its writeable and then finishes (releasing the
-// value).
+/**
+ * Returns a writer that sends the passed value to its writeable and then finishes (releasing the
+ * value).
+ */
+ (GRXWriter *)writerWithValue:(id)value;
-// Returns a writer that, as part of its start method, sends the passed error to the writeable
-// (then releasing the error).
+/**
+ * Returns a writer that, as part of its start method, sends the passed error to the writeable
+ * (then releasing the error).
+ */
+ (GRXWriter *)writerWithError:(NSError *)error;
-// Returns a writer that, as part of its start method, finishes immediately without sending any
-// values to its writeable.
+/**
+ * Returns a writer that, as part of its start method, finishes immediately without sending any
+ * values to its writeable.
+ */
+ (GRXWriter *)emptyWriter;
@end
diff --git a/src/objective-c/RxLibrary/GRXWriteable.h b/src/objective-c/RxLibrary/GRXWriteable.h
index 45613d6..7fe805c 100644
--- a/src/objective-c/RxLibrary/GRXWriteable.h
+++ b/src/objective-c/RxLibrary/GRXWriteable.h
@@ -33,16 +33,20 @@
#import <Foundation/Foundation.h>
-// A GRXWriteable is an object to which a sequence of values can be sent. The
-// sequence finishes with an optional error.
+/**
+ * A GRXWriteable is an object to which a sequence of values can be sent. The
+ * sequence finishes with an optional error.
+ */
@protocol GRXWriteable <NSObject>
-// Push the next value of the sequence to the receiving object.
+/** Push the next value of the sequence to the receiving object. */
- (void)writeValue:(id)value;
-// Signal that the sequence is completed, or that an error ocurred. After this
-// message is sent to the instance, neither it nor writeValue: may be
-// called again.
+/**
+ * Signal that the sequence is completed, or that an error ocurred. After this
+ * message is sent to the instance, neither it nor writeValue: may be
+ * called again.
+ */
- (void)writesFinishedWithError:(NSError *)errorOrNil;
@end
@@ -51,8 +55,10 @@
typedef void (^GRXSingleHandler)(id value, NSError *errorOrNil);
typedef void (^GRXEventHandler)(BOOL done, id value, NSError *error);
-// Utility to create objects that conform to the GRXWriteable protocol, from
-// blocks that handle each of the two methods of the protocol.
+/**
+ * Utility to create objects that conform to the GRXWriteable protocol, from
+ * blocks that handle each of the two methods of the protocol.
+ */
@interface GRXWriteable : NSObject<GRXWriteable>
+ (instancetype)writeableWithSingleHandler:(GRXSingleHandler)handler;
diff --git a/src/objective-c/RxLibrary/GRXWriter+Immediate.h b/src/objective-c/RxLibrary/GRXWriter+Immediate.h
index b75c0a5..be88015 100644
--- a/src/objective-c/RxLibrary/GRXWriter+Immediate.h
+++ b/src/objective-c/RxLibrary/GRXWriter+Immediate.h
@@ -35,32 +35,44 @@
@interface GRXWriter (Immediate)
-// Returns a writer that pulls values from the passed NSEnumerator instance and pushes them to
-// its writeable. The NSEnumerator is released when it finishes.
+/**
+ * Returns a writer that pulls values from the passed NSEnumerator instance and pushes them to
+ * its writeable. The NSEnumerator is released when it finishes.
+ */
+ (instancetype)writerWithEnumerator:(NSEnumerator *)enumerator;
-// Returns a writer that pushes to its writeable the successive values returned by the passed
-// block. When the block first returns nil, it is released.
+/**
+ * Returns a writer that pushes to its writeable the successive values returned by the passed
+ * block. When the block first returns nil, it is released.
+ */
+ (instancetype)writerWithValueSupplier:(id (^)())block;
-// Returns a writer that iterates over the values of the passed container and pushes them to
-// its writeable. The container is released when the iteration is over.
-//
-// Note that the usual speed gain of NSFastEnumeration over NSEnumerator results from not having to
-// call one method per element. Because GRXWriteable instances accept values one by one, that speed
-// gain doesn't happen here.
+/**
+ * Returns a writer that iterates over the values of the passed container and pushes them to
+ * its writeable. The container is released when the iteration is over.
+ *
+ * Note that the usual speed gain of NSFastEnumeration over NSEnumerator results from not having to
+ * call one method per element. Because GRXWriteable instances accept values one by one, that speed
+ * gain doesn't happen here.
+ */
+ (instancetype)writerWithContainer:(id<NSFastEnumeration>)container;
-// Returns a writer that sends the passed value to its writeable and then finishes (releasing the
-// value).
+/**
+ * Returns a writer that sends the passed value to its writeable and then finishes (releasing the
+ * value).
+ */
+ (instancetype)writerWithValue:(id)value;
-// Returns a writer that, as part of its start method, sends the passed error to the writeable
-// (then releasing the error).
+/**
+ * Returns a writer that, as part of its start method, sends the passed error to the writeable
+ * (then releasing the error).
+ */
+ (instancetype)writerWithError:(NSError *)error;
-// Returns a writer that, as part of its start method, finishes immediately without sending any
-// values to its writeable.
+/**
+ * Returns a writer that, as part of its start method, finishes immediately without sending any
+ * values to its writeable.
+ */
+ (instancetype)emptyWriter;
@end
diff --git a/src/objective-c/RxLibrary/GRXWriter+Transformations.h b/src/objective-c/RxLibrary/GRXWriter+Transformations.h
index 60c4da3..17d61e7 100644
--- a/src/objective-c/RxLibrary/GRXWriter+Transformations.h
+++ b/src/objective-c/RxLibrary/GRXWriter+Transformations.h
@@ -35,8 +35,10 @@
@interface GRXWriter (Transformations)
-// Returns a writer that wraps the receiver, and has all the values the receiver would write
-// transformed by the provided mapping function.
+/**
+ * Returns a writer that wraps the receiver, and has all the values the receiver would write
+ * transformed by the provided mapping function.
+ */
- (GRXWriter *)map:(id (^)(id value))map;
@end
diff --git a/src/objective-c/RxLibrary/GRXWriter.h b/src/objective-c/RxLibrary/GRXWriter.h
index b1c994a..ff81268 100644
--- a/src/objective-c/RxLibrary/GRXWriter.h
+++ b/src/objective-c/RxLibrary/GRXWriter.h
@@ -35,73 +35,87 @@
#import "GRXWriteable.h"
-// States of a writer.
+/** States of a writer. */
typedef NS_ENUM(NSInteger, GRXWriterState) {
- // The writer has not yet been given a writeable to which it can push its values. To have a writer
- // transition to the Started state, send it a startWithWriteable: message.
- //
- // A writer's state cannot be manually set to this value.
+ /**
+ * The writer has not yet been given a writeable to which it can push its values. To have a writer
+ * transition to the Started state, send it a startWithWriteable: message.
+ *
+ * A writer's state cannot be manually set to this value.
+ */
GRXWriterStateNotStarted,
- // The writer might push values to the writeable at any moment.
+ /** The writer might push values to the writeable at any moment. */
GRXWriterStateStarted,
- // The writer is temporarily paused, and won't send any more values to the writeable unless its
- // state is set back to Started. The writer might still transition to the Finished state at any
- // moment, and is allowed to send writesFinishedWithError: to its writeable.
+ /**
+ * The writer is temporarily paused, and won't send any more values to the writeable unless its
+ * state is set back to Started. The writer might still transition to the Finished state at any
+ * moment, and is allowed to send writesFinishedWithError: to its writeable.
+ */
GRXWriterStatePaused,
- // The writer has released its writeable and won't interact with it anymore.
- //
- // One seldomly wants to set a writer's state to this value, as its writeable isn't notified with
- // a writesFinishedWithError: message. Instead, sending finishWithError: to the writer will make
- // it notify the writeable and then transition to this state.
+ /**
+ * The writer has released its writeable and won't interact with it anymore.
+ *
+ * One seldomly wants to set a writer's state to this value, as its writeable isn't notified with
+ * a writesFinishedWithError: message. Instead, sending finishWithError: to the writer will make
+ * it notify the writeable and then transition to this state.
+ */
GRXWriterStateFinished
};
-// An GRXWriter object can produce, on demand, a sequence of values. The sequence may be produced
-// asynchronously, and it may consist of any number of elements, including none or an infinite
-// number.
-//
-// GRXWriter is the active dual of NSEnumerator. The difference between them is thus whether the
-// object plays an active or passive role during usage: A user of NSEnumerator pulls values off it,
-// and passes the values to a writeable. A user of GRXWriter, though, just gives it a writeable, and
-// the GRXWriter instance pushes values to the writeable. This makes this protocol suitable to
-// represent a sequence of future values, as well as collections with internal iteration.
-//
-// An instance of GRXWriter can start producing values after a writeable is passed to it. It can
-// also be commanded to finish the sequence immediately (with an optional error). Finally, it can be
-// asked to pause, and resumed later. All GRXWriter objects support pausing and early termination.
-//
-// Thread-safety:
-//
-// State transitions take immediate effect if the object is used from a single thread. Subclasses
-// might offer stronger guarantees.
-//
-// Unless otherwise indicated by a conforming subclass, no messages should be sent concurrently to a
-// GRXWriter. I.e., conforming classes aren't required to be thread-safe.
+/**
+ * An GRXWriter object can produce, on demand, a sequence of values. The sequence may be produced
+ * asynchronously, and it may consist of any number of elements, including none or an infinite
+ * number.
+ *
+ * GRXWriter is the active dual of NSEnumerator. The difference between them is thus whether the
+ * object plays an active or passive role during usage: A user of NSEnumerator pulls values off it,
+ * and passes the values to a writeable. A user of GRXWriter, though, just gives it a writeable, and
+ * the GRXWriter instance pushes values to the writeable. This makes this protocol suitable to
+ * represent a sequence of future values, as well as collections with internal iteration.
+ *
+ * An instance of GRXWriter can start producing values after a writeable is passed to it. It can
+ * also be commanded to finish the sequence immediately (with an optional error). Finally, it can be
+ * asked to pause, and resumed later. All GRXWriter objects support pausing and early termination.
+ *
+ * Thread-safety:
+ *
+ * State transitions take immediate effect if the object is used from a single thread. Subclasses
+ * might offer stronger guarantees.
+ *
+ * Unless otherwise indicated by a conforming subclass, no messages should be sent concurrently to a
+ * GRXWriter. I.e., conforming classes aren't required to be thread-safe.
+ */
@interface GRXWriter : NSObject
-// This property can be used to query the current state of the writer, which determines how it might
-// currently use its writeable. Some state transitions can be triggered by setting this property to
-// the corresponding value, and that's useful for advanced use cases like pausing an writer. For
-// more details, see the documentation of the enum further down.
+/**
+ * This property can be used to query the current state of the writer, which determines how it might
+ * currently use its writeable. Some state transitions can be triggered by setting this property to
+ * the corresponding value, and that's useful for advanced use cases like pausing an writer. For
+ * more details, see the documentation of the enum further down.
+ */
@property(nonatomic) GRXWriterState state;
-// Transition to the Started state, and start sending messages to the writeable (a reference to it
-// is retained). Messages to the writeable may be sent before the method returns, or they may be
-// sent later in the future. See GRXWriteable.h for the different messages a writeable can receive.
-//
-// If this writer draws its values from an external source (e.g. from the filesystem or from a
-// server), calling this method will commonly trigger side effects (like network connections).
-//
-// This method might only be called on writers in the NotStarted state.
+/**
+ * Transition to the Started state, and start sending messages to the writeable (a reference to it
+ * is retained). Messages to the writeable may be sent before the method returns, or they may be
+ * sent later in the future. See GRXWriteable.h for the different messages a writeable can receive.
+ *
+ * If this writer draws its values from an external source (e.g. from the filesystem or from a
+ * server), calling this method will commonly trigger side effects (like network connections).
+ *
+ * This method might only be called on writers in the NotStarted state.
+ */
- (void)startWithWriteable:(id<GRXWriteable>)writeable;
-// Send writesFinishedWithError:errorOrNil to the writeable. Then release the reference to it and
-// transition to the Finished state.
-//
-// This method might only be called on writers in the Started or Paused state.
+/**
+ * Send writesFinishedWithError:errorOrNil to the writeable. Then release the reference to it and
+ * transition to the Finished state.
+ *
+ * This method might only be called on writers in the Started or Paused state.
+ */
- (void)finishWithError:(NSError *)errorOrNil;
@end
diff --git a/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.h b/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.h
index 400e834..0622f70 100644
--- a/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.h
+++ b/src/objective-c/RxLibrary/NSEnumerator+GRXUtil.h
@@ -35,17 +35,23 @@
@interface NSEnumerator (GRXUtil)
-// Returns a NSEnumerator instance that iterates through the elements of the passed container that
-// supports fast enumeration. Note that this negates the speed benefits of fast enumeration over
-// NSEnumerator. It's only intended for the rare cases when one needs the latter and only has the
-// former, e.g. for iteration that needs to be paused and resumed later.
+/**
+ * Returns a NSEnumerator instance that iterates through the elements of the passed container that
+ * supports fast enumeration. Note that this negates the speed benefits of fast enumeration over
+ * NSEnumerator. It's only intended for the rare cases when one needs the latter and only has the
+ * former, e.g. for iteration that needs to be paused and resumed later.
+ */
+ (NSEnumerator *)grx_enumeratorWithContainer:(id<NSFastEnumeration>)container;
-// Returns a NSEnumerator instance that provides a single object before finishing. The value is then
-// released.
+/**
+ * Returns a NSEnumerator instance that provides a single object before finishing. The value is then
+ * released.
+ */
+ (NSEnumerator *)grx_enumeratorWithSingleValue:(id)value;
-// Returns a NSEnumerator instance that delegates the invocations of nextObject to the passed block.
-// When the block first returns nil, it is released.
+/**
+ * Returns a NSEnumerator instance that delegates the invocations of nextObject to the passed block.
+ * When the block first returns nil, it is released.
+ */
+ (NSEnumerator *)grx_enumeratorWithValueSupplier:(id (^)())block;
@end
diff --git a/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.h b/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.h
index 34cfc4d..fb50c37 100644
--- a/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.h
+++ b/src/objective-c/RxLibrary/private/GRXNSBlockEnumerator.h
@@ -33,10 +33,14 @@
#import <Foundation/Foundation.h>
-// Concrete subclass of NSEnumerator that delegates the invocations of nextObject to a block passed
-// on initialization.
+/**
+ * Concrete subclass of NSEnumerator that delegates the invocations of nextObject to a block passed
+ * on initialization.
+ */
@interface GRXNSBlockEnumerator : NSEnumerator
-// The first time the passed block returns nil, the enumeration will end and the block will be
-// released.
+/**
+ * The first time the passed block returns nil, the enumeration will end and the block will be
+ * released.
+ */
- (instancetype)initWithValueSupplier:(id (^)())block;
@end
diff --git a/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.h b/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.h
index 1565029..62c27db 100644
--- a/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.h
+++ b/src/objective-c/RxLibrary/private/GRXNSFastEnumerator.h
@@ -33,11 +33,15 @@
#import <Foundation/Foundation.h>
-// This is a bridge to interact through NSEnumerator's interface with objects that only conform to
-// NSFastEnumeration. (There's nothing specifically fast about it - you certainly don't win any
-// speed by using this instead of a NSEnumerator provided by your container).
+/**
+ * This is a bridge to interact through NSEnumerator's interface with objects that only conform to
+ * NSFastEnumeration. (There's nothing specifically fast about it - you certainly don't win any
+ * speed by using this instead of a NSEnumerator provided by your container).
+ */
@interface GRXNSFastEnumerator : NSEnumerator
-// After the iteration of the container (via the NSFastEnumeration protocol) is over, the container
-// is released. If the container is modified during enumeration, an exception is thrown.
+/**
+ * After the iteration of the container (via the NSFastEnumeration protocol) is over, the container
+ * is released. If the container is modified during enumeration, an exception is thrown.
+ */
- (instancetype)initWithContainer:(id<NSFastEnumeration>)container;
@end
diff --git a/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.h b/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.h
index 12aa51e..24a21a1 100644
--- a/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.h
+++ b/src/objective-c/RxLibrary/private/GRXNSScalarEnumerator.h
@@ -33,9 +33,11 @@
#import <Foundation/Foundation.h>
-// Concrete subclass of NSEnumerator whose instances return a single object before finishing.
+/** Concrete subclass of NSEnumerator whose instances return a single object before finishing. */
@interface GRXNSScalarEnumerator : NSEnumerator
-// Param value: the single object this instance will produce. After the first invocation of
-// nextObject, the value is released.
+/**
+ * Param value: the single object this instance will produce. After the first invocation of
+ * nextObject, the value is released.
+ */
- (instancetype)initWithValue:(id)value;
@end
diff --git a/src/objective-c/RxLibrary/transformations/GRXMappingWriter.h b/src/objective-c/RxLibrary/transformations/GRXMappingWriter.h
index 43b8706..01a15e2 100644
--- a/src/objective-c/RxLibrary/transformations/GRXMappingWriter.h
+++ b/src/objective-c/RxLibrary/transformations/GRXMappingWriter.h
@@ -33,7 +33,7 @@
#import "RxLibrary/GRXForwardingWriter.h"
-// A "proxy" writer that transforms all the values of its input writer by using a mapping function.
+/** A "proxy" writer that transforms all the values of its input writer by using a mapping function. */
@interface GRXMappingWriter : GRXForwardingWriter
- (instancetype)initWithWriter:(GRXWriter *)writer map:(id (^)(id value))map
NS_DESIGNATED_INITIALIZER;
diff --git a/src/objective-c/change-comments.py b/src/objective-c/change-comments.py
new file mode 100755
index 0000000..9aa0e0c
--- /dev/null
+++ b/src/objective-c/change-comments.py
@@ -0,0 +1,128 @@
+#!/usr/bin/env python2.7
+# Copyright 2015, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""Change comments style of source files from // to /** */"""
+
+import re
+import sys
+
+
+if len(sys.argv) < 2:
+ print("Please provide at least one source file name as argument.")
+ sys.exit()
+
+for file_name in sys.argv[1:]:
+
+ print("Modifying format of {file} comments in place...".format(
+ file=file_name,
+ ))
+
+
+ # Input
+
+ with open(file_name, "r") as input_file:
+ lines = input_file.readlines()
+
+ def peek():
+ return lines[0]
+
+ def read_line():
+ return lines.pop(0)
+
+ def more_input_available():
+ return lines
+
+
+ # Output
+
+ output_lines = []
+
+ def write(line):
+ output_lines.append(line)
+
+ def flush_output():
+ with open(file_name, "w") as output_file:
+ for line in output_lines:
+ output_file.write(line)
+
+
+ # Pattern matching
+
+ comment_regex = r'^(\s*)//\s(.*)$'
+
+ def is_comment(line):
+ return re.search(comment_regex, line)
+
+ def isnt_comment(line):
+ return not is_comment(line)
+
+ def next_line(predicate):
+ return more_input_available() and predicate(peek())
+
+
+ # Transformation
+
+ def indentation_of(line):
+ match = re.search(comment_regex, line)
+ return match.group(1)
+
+ def content(line):
+ match = re.search(comment_regex, line)
+ return match.group(2)
+
+ def format_as_block(comment_block):
+ if len(comment_block) == 0:
+ return []
+
+ indent = indentation_of(comment_block[0])
+
+ if len(comment_block) == 1:
+ return [indent + "/** " + content(comment_block[0]) + " */\n"]
+
+ block = ["/**"] + [" * " + content(line) for line in comment_block] + [" */"]
+ return [indent + line.rstrip() + "\n" for line in block]
+
+
+ # Main algorithm
+
+ while more_input_available():
+ while next_line(isnt_comment):
+ write(read_line())
+
+ comment_block = []
+ # Get all lines in the same comment block. We could restrict the indentation
+ # to be the same as the first line of the block, but it's probably ok.
+ while (next_line(is_comment)):
+ comment_block.append(read_line())
+
+ for line in format_as_block(comment_block):
+ write(line)
+
+ flush_output()
diff --git a/src/python/grpcio_test/grpc_test/early_adopter/__init__.py b/src/objective-c/format-all-comments.sh
similarity index 89%
rename from src/python/grpcio_test/grpc_test/early_adopter/__init__.py
rename to src/objective-c/format-all-comments.sh
index 7086519..e6b6b5a 100644
--- a/src/python/grpcio_test/grpc_test/early_adopter/__init__.py
+++ b/src/objective-c/format-all-comments.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
# Copyright 2015, Google Inc.
# All rights reserved.
#
@@ -27,4 +28,4 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+find . -type f -name "*.h" ! -path "*/Pods/*" ! -path "./generated_libraries/*" ! -path "./examples/*" ! -path "./tests/*" | xargs ./change-comments.py
diff --git a/src/objective-c/tests/GRPCClientTests.m b/src/objective-c/tests/GRPCClientTests.m
index 09a55e0..00c4b88 100644
--- a/src/objective-c/tests/GRPCClientTests.m
+++ b/src/objective-c/tests/GRPCClientTests.m
@@ -42,9 +42,6 @@
#import <RxLibrary/GRXWriteable.h>
#import <RxLibrary/GRXWriter+Immediate.h>
-// These are a few tests similar to InteropTests, but which use the generic gRPC client (GRPCCall)
-// rather than a generated proto library on top of it.
-
static NSString * const kHostAddress = @"localhost:5050";
static NSString * const kPackage = @"grpc.testing";
static NSString * const kService = @"TestService";
@@ -53,11 +50,10 @@
static ProtoMethod *kEmptyCallMethod;
static ProtoMethod *kUnaryCallMethod;
-// This is an observer class for testing that responseMetadata is KVO-compliant
-
+/** Observer class for testing that responseMetadata is KVO-compliant */
@interface PassthroughObserver : NSObject
-
-- (instancetype) initWithCallback:(void (^)(NSString*, id, NSDictionary*))callback;
+- (instancetype) initWithCallback:(void (^)(NSString*, id, NSDictionary*))callback
+ NS_DESIGNATED_INITIALIZER;
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change
context:(void *)context;
@@ -67,23 +63,38 @@
void (^_callback)(NSString*, id, NSDictionary*);
}
+- (instancetype)init {
+ return [self initWithCallback:nil];
+}
+
- (instancetype)initWithCallback:(void (^)(NSString *, id, NSDictionary *))callback {
- self = [super init];
- if (self) {
+ if (!callback) {
+ return nil;
+ }
+ if ((self = [super init])) {
_callback = callback;
}
return self;
-
}
-- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
-{
+- (void)observeValueForKeyPath:(NSString *)keyPath
+ ofObject:(id)object
+ change:(NSDictionary *)change
+ context:(void *)context {
_callback(keyPath, object, change);
[object removeObserver:self forKeyPath:keyPath];
}
@end
+# pragma mark Tests
+
+/**
+ * A few tests similar to InteropTests, but which use the generic gRPC client (GRPCCall) rather than
+ * a generated proto library on top of it. Its RPCs are sent to a local cleartext server.
+ *
+ * TODO(jcanizales): Run them also against a local SSL server and against a remote server.
+ */
@interface GRPCClientTests : XCTestCase
@end
@@ -180,6 +191,7 @@
[self waitForExpectationsWithTimeout:8 handler:nil];
}
+// TODO(jcanizales): Activate this test against the remote server.
- (void)testMetadata {
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"RPC unauthorized."];
diff --git a/src/objective-c/tests/InteropTests.h b/src/objective-c/tests/InteropTests.h
index 1045c3d..6d54343 100644
--- a/src/objective-c/tests/InteropTests.h
+++ b/src/objective-c/tests/InteropTests.h
@@ -33,11 +33,17 @@
#import <XCTest/XCTest.h>
-// Implements tests as described here:
-// https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md
-
+/**
+ * Implements tests as described here:
+ * https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md
+ *
+ * This is an abstract class that needs to be subclassed. See |+host|.
+ */
@interface InteropTests : XCTestCase
-// Returns @"grpc-test.sandbox.google.com".
-// Override in a subclass to perform the same tests against a different address.
+/**
+ * Host to send the RPCs to. The base implementation returns nil, which would make all tests to
+ * fail.
+ * Override in a subclass to perform these tests against a specific address.
+ */
+ (NSString *)host;
@end
diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests.m
index af58e2b..26877b1 100644
--- a/src/objective-c/tests/InteropTests.m
+++ b/src/objective-c/tests/InteropTests.m
@@ -78,21 +78,20 @@
#pragma mark Tests
-static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.google.com";
-
@implementation InteropTests {
RMTTestService *_service;
}
+ (NSString *)host {
- return kRemoteSSLHost;
+ return nil;
}
- (void)setUp {
- _service = [RMTTestService serviceWithHost:self.class.host];
+ _service = self.class.host ? [RMTTestService serviceWithHost:self.class.host] : nil;
}
- (void)testEmptyUnaryRPC {
+ XCTAssertNotNil(self.class.host);
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"EmptyUnary"];
RMTEmpty *request = [RMTEmpty message];
@@ -110,6 +109,7 @@
}
- (void)testLargeUnaryRPC {
+ XCTAssertNotNil(self.class.host);
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"LargeUnary"];
RMTSimpleRequest *request = [RMTSimpleRequest message];
@@ -132,6 +132,7 @@
}
- (void)testClientStreamingRPC {
+ XCTAssertNotNil(self.class.host);
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"ClientStreaming"];
RMTStreamingInputCallRequest *request1 = [RMTStreamingInputCallRequest message];
@@ -164,6 +165,7 @@
}
- (void)testServerStreamingRPC {
+ XCTAssertNotNil(self.class.host);
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"ServerStreaming"];
NSArray *expectedSizes = @[@31415, @9, @2653, @58979];
@@ -200,6 +202,7 @@
}
- (void)testPingPongRPC {
+ XCTAssertNotNil(self.class.host);
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"PingPong"];
NSArray *requests = @[@27182, @8, @1828, @45904];
@@ -243,6 +246,7 @@
}
- (void)testEmptyStreamRPC {
+ XCTAssertNotNil(self.class.host);
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"EmptyStream"];
[_service fullDuplexCallWithRequestsWriter:[GRXWriter emptyWriter]
eventHandler:^(BOOL done,
@@ -256,6 +260,7 @@
}
- (void)testCancelAfterBeginRPC {
+ XCTAssertNotNil(self.class.host);
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"CancelAfterBegin"];
// A buffered pipe to which we never write any value acts as a writer that just hangs.
@@ -273,6 +278,7 @@
}
- (void)testCancelAfterFirstResponseRPC {
+ XCTAssertNotNil(self.class.host);
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"CancelAfterFirstResponse"];
// A buffered pipe to which we write a single value but never close
diff --git a/src/objective-c/tests/InteropTestsLocalCleartext.m b/src/objective-c/tests/InteropTestsLocalCleartext.m
index 2d7d3c4..56927a8 100644
--- a/src/objective-c/tests/InteropTestsLocalCleartext.m
+++ b/src/objective-c/tests/InteropTestsLocalCleartext.m
@@ -31,15 +31,13 @@
*
*/
-// Repeat of the tests in InteropTests.m, but sending the RPCs to a local cleartext server instead
-// of the remote SSL one.
-
#import <GRPCClient/GRPCCall+Tests.h>
#import "InteropTests.h"
static NSString * const kLocalCleartextHost = @"localhost:5050";
+/** Tests in InteropTests.m, sending the RPCs to a local cleartext server. */
@interface InteropTestsLocalCleartext : InteropTests
@end
diff --git a/src/objective-c/tests/InteropTestsLocalSSL.m b/src/objective-c/tests/InteropTestsLocalSSL.m
index f69f806..9d7afef 100644
--- a/src/objective-c/tests/InteropTestsLocalSSL.m
+++ b/src/objective-c/tests/InteropTestsLocalSSL.m
@@ -31,15 +31,13 @@
*
*/
-// Repeat of the tests in InteropTests.m, but sending the RPCs to a local SSL server instead of the
-// remote one.
-
#import <GRPCClient/GRPCCall+Tests.h>
#import "InteropTests.h"
static NSString * const kLocalSSLHost = @"localhost:5051";
+/** Tests in InteropTests.m, sending the RPCs to a local SSL server. */
@interface InteropTestsLocalSSL : InteropTests
@end
diff --git a/src/objective-c/tests/InteropTestsRemote.m b/src/objective-c/tests/InteropTestsRemote.m
new file mode 100644
index 0000000..a67be98
--- /dev/null
+++ b/src/objective-c/tests/InteropTestsRemote.m
@@ -0,0 +1,50 @@
+/*
+ *
+ * Copyright 2015, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#import <GRPCClient/GRPCCall+Tests.h>
+
+#import "InteropTests.h"
+
+static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.google.com";
+
+/** Tests in InteropTests.m, sending the RPCs to a remote SSL server. */
+@interface InteropTestsRemote : InteropTests
+@end
+
+@implementation InteropTestsRemote
+
++ (NSString *)host {
+ return kRemoteSSLHost;
+}
+
+@end
diff --git a/src/objective-c/tests/LocalClearTextTests.m b/src/objective-c/tests/LocalClearTextTests.m
deleted file mode 100644
index 976fff5..0000000
--- a/src/objective-c/tests/LocalClearTextTests.m
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#import <UIKit/UIKit.h>
-#import <XCTest/XCTest.h>
-
-#import <GRPCClient/GRPCCall.h>
-#import <ProtoRPC/ProtoMethod.h>
-#import <RouteGuide/RouteGuide.pbobjc.h>
-#import <RouteGuide/RouteGuide.pbrpc.h>
-#import <RxLibrary/GRXWriteable.h>
-#import <RxLibrary/GRXWriter+Immediate.h>
-
-// These tests require a gRPC "RouteGuide" sample server to be running locally. You can compile and
-// run one by following the instructions here: https://github.com/grpc/grpc/blob/master/examples/cpp/cpptutorial.md#try-it-out
-// Be sure to have the C gRPC library installed in your system (for example, by having followed the
-// instructions at https://github.com/grpc/homebrew-grpc
-
-static NSString * const kRouteGuideHost = @"http://localhost:50051";
-static NSString * const kPackage = @"routeguide";
-static NSString * const kService = @"RouteGuide";
-
-@interface LocalClearTextTests : XCTestCase
-@end
-
-@implementation LocalClearTextTests
-
-// This test currently fails: see Issue #1907.
-//- (void)testConnectionToLocalServer {
-// __weak XCTestExpectation *expectation = [self expectationWithDescription:@"Server reachable."];
-//
-// // This method isn't implemented by the local server.
-// GRPCMethodName *method = [[GRPCMethodName alloc] initWithPackage:kPackage
-// interface:kService
-// method:@"EmptyCall"];
-//
-// GRXWriter *requestsWriter = [GRXWriter writerWithValue:[NSData data]];
-//
-// GRPCCall *call = [[GRPCCall alloc] initWithHost:kRouteGuideHost
-// method:method
-// requestsWriter:requestsWriter];
-//
-// id<GRXWriteable> responsesWriteable = [[GRXWriteable alloc] initWithValueHandler:^(NSData *value) {
-// XCTFail(@"Received unexpected response: %@", value);
-// } completionHandler:^(NSError *errorOrNil) {
-// XCTAssertNotNil(errorOrNil, @"Finished without error!");
-// XCTAssertEqual(errorOrNil.code, 12, @"Finished with unexpected error: %@", errorOrNil);
-// [expectation fulfill];
-// }];
-//
-// [call startWithWriteable:responsesWriteable];
-//
-// [self waitForExpectationsWithTimeout:8.0 handler:nil];
-//}
-
-- (void)testEmptyRPC {
- __weak XCTestExpectation *response = [self expectationWithDescription:@"Empty response received."];
- __weak XCTestExpectation *completion = [self expectationWithDescription:@"Empty RPC completed."];
-
- ProtoMethod *method = [[ProtoMethod alloc] initWithPackage:kPackage
- service:kService
- method:@"RecordRoute"];
-
- GRXWriter *requestsWriter = [GRXWriter emptyWriter];
-
- GRPCCall *call = [[GRPCCall alloc] initWithHost:kRouteGuideHost
- path:method.HTTPPath
- requestsWriter:requestsWriter];
-
- 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:2.0 handler:nil];
-}
-
-- (void)testSimpleProtoRPC {
- __weak XCTestExpectation *response = [self expectationWithDescription:@"Response received."];
- __weak XCTestExpectation *completion = [self expectationWithDescription:@"RPC completed."];
-
- ProtoMethod *method = [[ProtoMethod alloc] initWithPackage:kPackage
- service:kService
- method:@"GetFeature"];
-
- RGDPoint *point = [RGDPoint message];
- point.latitude = 28E7;
- point.longitude = -15E7;
- GRXWriter *requestsWriter = [GRXWriter writerWithValue:[point data]];
-
- GRPCCall *call = [[GRPCCall alloc] initWithHost:kRouteGuideHost
- path:method.HTTPPath
- requestsWriter:requestsWriter];
-
- id<GRXWriteable> responsesWriteable = [[GRXWriteable alloc] initWithValueHandler:^(NSData *value) {
- XCTAssertNotNil(value, @"nil value received as response.");
- RGDFeature *feature = [RGDFeature parseFromData:value error:NULL];
- XCTAssertEqualObjects(point, feature.location);
- XCTAssertNotNil(feature.name, @"Response's name is nil.");
- [response fulfill];
- } completionHandler:^(NSError *errorOrNil) {
- XCTAssertNil(errorOrNil, @"Finished with unexpected error: %@", errorOrNil);
- [completion fulfill];
- }];
-
- [call startWithWriteable:responsesWriteable];
-
- [self waitForExpectationsWithTimeout:2.0 handler:nil];
-}
-
-- (void)testSimpleProtoRPCUsingGeneratedService {
- __weak XCTestExpectation *completion = [self expectationWithDescription:@"RPC completed."];
-
- RGDPoint *point = [RGDPoint message];
- point.latitude = 28E7;
- point.longitude = -15E7;
-
- RGDRouteGuide *service = [[RGDRouteGuide alloc] initWithHost:kRouteGuideHost];
- [service getFeatureWithRequest:point handler:^(RGDFeature *response, NSError *error) {
- XCTAssertNil(error, @"Finished with unexpected error: %@", error);
- XCTAssertEqualObjects(point, response.location);
- XCTAssertNotNil(response.name, @"Response's name is nil.");
- [completion fulfill];
- }];
-
- [self waitForExpectationsWithTimeout:2.0 handler:nil];
-}
-@end
diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile
index 2aa837f..2a9b894 100644
--- a/src/objective-c/tests/Podfile
+++ b/src/objective-c/tests/Podfile
@@ -6,10 +6,26 @@
pod 'RemoteTest', :path => "../generated_libraries/RemoteTestClient"
pod 'RouteGuide', :path => "../generated_libraries/RouteGuideClient"
-link_with 'AllTests'
+link_with 'AllTests',
+ 'RxLibraryUnitTests',
+ 'InteropTests',
+ 'InteropTestsLocalSSL',
+ 'InteropTestsLocalCleartext'
target 'Tests' do
end
target 'AllTests' do
end
+
+target 'RxLibraryUnitTests' do
+end
+
+target 'InteropTestsRemote' do
+end
+
+target 'InteropTestsLocalSSL' do
+end
+
+target 'InteropTestsLocalCleartext' do
+end
diff --git a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj
index 3a1c3d9..b042961 100644
--- a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj
+++ b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj
@@ -7,16 +7,33 @@
objects = {
/* Begin PBXBuildFile section */
+ 036D953EE34B1FD523647ACD /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 35F2B6BF3BAE8F0DC4AFD76E /* libPods.a */; };
+ 08A8BB02D19A53D902B214B8 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 35F2B6BF3BAE8F0DC4AFD76E /* libPods.a */; };
+ 50267643BA114A2A724D4FDF /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 35F2B6BF3BAE8F0DC4AFD76E /* libPods.a */; };
6312AE4E1B1BF49B00341DEE /* GRPCClientTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6312AE4D1B1BF49B00341DEE /* GRPCClientTests.m */; };
- 63175DFF1B1B9FAF00027841 /* LocalClearTextTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 63175DFE1B1B9FAF00027841 /* LocalClearTextTests.m */; };
63423F4A1B150A5F006CF63C /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; };
- 63423F511B151B77006CF63C /* RxLibraryUnitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 63423F501B151B77006CF63C /* RxLibraryUnitTests.m */; };
635697CD1B14FC11007A7283 /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 635697CC1B14FC11007A7283 /* Tests.m */; };
635ED2EC1B1A3BC400FDE5C3 /* InteropTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */; };
63715F561B780C020029CB0B /* InteropTestsLocalCleartext.m in Sources */ = {isa = PBXBuildFile; fileRef = 63715F551B780C020029CB0B /* InteropTestsLocalCleartext.m */; };
+ 6379CC4D1BE1662A001BC0A1 /* InteropTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */; settings = {ASSET_TAGS = (); }; };
+ 6379CC4E1BE1662B001BC0A1 /* InteropTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */; settings = {ASSET_TAGS = (); }; };
+ 6379CC501BE16703001BC0A1 /* InteropTestsRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = 6379CC4F1BE16703001BC0A1 /* InteropTestsRemote.m */; settings = {ASSET_TAGS = (); }; };
+ 6379CC511BE1683B001BC0A1 /* InteropTestsRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = 6379CC4F1BE16703001BC0A1 /* InteropTestsRemote.m */; settings = {ASSET_TAGS = (); }; };
+ 6379CC531BE17709001BC0A1 /* TestCertificates.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 63E240CF1B6C63DC005F3B0E /* TestCertificates.bundle */; settings = {ASSET_TAGS = (); }; };
+ 63DC84181BE15179000708E8 /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; settings = {ASSET_TAGS = (); }; };
+ 63DC841E1BE15180000708E8 /* RxLibraryUnitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 63423F501B151B77006CF63C /* RxLibraryUnitTests.m */; settings = {ASSET_TAGS = (); }; };
+ 63DC84281BE15267000708E8 /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; settings = {ASSET_TAGS = (); }; };
+ 63DC842E1BE15278000708E8 /* RxLibraryUnitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 63423F501B151B77006CF63C /* RxLibraryUnitTests.m */; settings = {ASSET_TAGS = (); }; };
+ 63DC842F1BE1527D000708E8 /* InteropTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */; settings = {ASSET_TAGS = (); }; };
+ 63DC84391BE15294000708E8 /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; settings = {ASSET_TAGS = (); }; };
+ 63DC84481BE152B5000708E8 /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; settings = {ASSET_TAGS = (); }; };
+ 63DC844E1BE15350000708E8 /* InteropTestsLocalCleartext.m in Sources */ = {isa = PBXBuildFile; fileRef = 63715F551B780C020029CB0B /* InteropTestsLocalCleartext.m */; settings = {ASSET_TAGS = (); }; };
+ 63DC844F1BE15353000708E8 /* InteropTestsLocalSSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 63E240CD1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m */; settings = {ASSET_TAGS = (); }; };
+ 63DC84501BE153AA000708E8 /* GRPCClientTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6312AE4D1B1BF49B00341DEE /* GRPCClientTests.m */; settings = {ASSET_TAGS = (); }; };
63E240CE1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 63E240CD1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m */; };
63E240D01B6C63DC005F3B0E /* TestCertificates.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 63E240CF1B6C63DC005F3B0E /* TestCertificates.bundle */; };
7D8A186224D39101F90230F6 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 35F2B6BF3BAE8F0DC4AFD76E /* libPods.a */; };
+ DCFAE001609CCBFE69DFA6A1 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 35F2B6BF3BAE8F0DC4AFD76E /* libPods.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -27,6 +44,34 @@
remoteGlobalIDString = 635697C61B14FC11007A7283;
remoteInfo = Tests;
};
+ 63DC84191BE15179000708E8 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 635697BF1B14FC11007A7283 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 635697C61B14FC11007A7283;
+ remoteInfo = Tests;
+ };
+ 63DC84291BE15267000708E8 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 635697BF1B14FC11007A7283 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 635697C61B14FC11007A7283;
+ remoteInfo = Tests;
+ };
+ 63DC843A1BE15294000708E8 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 635697BF1B14FC11007A7283 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 635697C61B14FC11007A7283;
+ remoteInfo = Tests;
+ };
+ 63DC84491BE152B5000708E8 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 635697BF1B14FC11007A7283 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 635697C61B14FC11007A7283;
+ remoteInfo = Tests;
+ };
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -45,7 +90,6 @@
0A4F89D9C90E9C30990218F0 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
35F2B6BF3BAE8F0DC4AFD76E /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
6312AE4D1B1BF49B00341DEE /* GRPCClientTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRPCClientTests.m; sourceTree = "<group>"; };
- 63175DFE1B1B9FAF00027841 /* LocalClearTextTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocalClearTextTests.m; sourceTree = "<group>"; };
63423F441B150A5F006CF63C /* AllTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AllTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
63423F501B151B77006CF63C /* RxLibraryUnitTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RxLibraryUnitTests.m; sourceTree = "<group>"; };
635697C71B14FC11007A7283 /* libTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTests.a; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -53,6 +97,11 @@
635697D81B14FC11007A7283 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteropTests.m; sourceTree = "<group>"; };
63715F551B780C020029CB0B /* InteropTestsLocalCleartext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteropTestsLocalCleartext.m; sourceTree = "<group>"; };
+ 6379CC4F1BE16703001BC0A1 /* InteropTestsRemote.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteropTestsRemote.m; sourceTree = "<group>"; };
+ 63DC84131BE15179000708E8 /* RxLibraryUnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RxLibraryUnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 63DC84231BE15267000708E8 /* InteropTestsRemote.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InteropTestsRemote.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 63DC84341BE15294000708E8 /* InteropTestsLocalSSL.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InteropTestsLocalSSL.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 63DC84431BE152B5000708E8 /* InteropTestsLocalCleartext.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InteropTestsLocalCleartext.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
63E240CC1B6C4D3A005F3B0E /* InteropTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InteropTests.h; sourceTree = "<group>"; };
63E240CD1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteropTestsLocalSSL.m; sourceTree = "<group>"; };
63E240CF1B6C63DC005F3B0E /* TestCertificates.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = TestCertificates.bundle; sourceTree = "<group>"; };
@@ -76,6 +125,42 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 63DC84101BE15179000708E8 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 63DC84181BE15179000708E8 /* libTests.a in Frameworks */,
+ 036D953EE34B1FD523647ACD /* libPods.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 63DC84201BE15267000708E8 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 63DC84281BE15267000708E8 /* libTests.a in Frameworks */,
+ DCFAE001609CCBFE69DFA6A1 /* libPods.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 63DC84311BE15294000708E8 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 63DC84391BE15294000708E8 /* libTests.a in Frameworks */,
+ 08A8BB02D19A53D902B214B8 /* libPods.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 63DC84401BE152B5000708E8 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 63DC84481BE152B5000708E8 /* libTests.a in Frameworks */,
+ 50267643BA114A2A724D4FDF /* libPods.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
@@ -112,6 +197,10 @@
children = (
635697C71B14FC11007A7283 /* libTests.a */,
63423F441B150A5F006CF63C /* AllTests.xctest */,
+ 63DC84131BE15179000708E8 /* RxLibraryUnitTests.xctest */,
+ 63DC84231BE15267000708E8 /* InteropTestsRemote.xctest */,
+ 63DC84341BE15294000708E8 /* InteropTestsLocalSSL.xctest */,
+ 63DC84431BE152B5000708E8 /* InteropTestsLocalCleartext.xctest */,
);
name = Products;
sourceTree = "<group>";
@@ -122,10 +211,10 @@
6312AE4D1B1BF49B00341DEE /* GRPCClientTests.m */,
63E240CC1B6C4D3A005F3B0E /* InteropTests.h */,
635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */,
+ 6379CC4F1BE16703001BC0A1 /* InteropTestsRemote.m */,
63E240CD1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m */,
63715F551B780C020029CB0B /* InteropTestsLocalCleartext.m */,
63423F501B151B77006CF63C /* RxLibraryUnitTests.m */,
- 63175DFE1B1B9FAF00027841 /* LocalClearTextTests.m */,
635697CC1B14FC11007A7283 /* Tests.m */,
635697D71B14FC11007A7283 /* Supporting Files */,
);
@@ -152,6 +241,7 @@
63423F411B150A5F006CF63C /* Frameworks */,
63423F421B150A5F006CF63C /* Resources */,
A441F71824DCB9D0CA297748 /* Copy Pods Resources */,
+ 5F14F59509E10C2852014F9E /* Embed Pods Frameworks */,
);
buildRules = (
);
@@ -180,6 +270,90 @@
productReference = 635697C71B14FC11007A7283 /* libTests.a */;
productType = "com.apple.product-type.library.static";
};
+ 63DC84121BE15179000708E8 /* RxLibraryUnitTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 63DC841B1BE15179000708E8 /* Build configuration list for PBXNativeTarget "RxLibraryUnitTests" */;
+ buildPhases = (
+ B2986CEEE8CDD4901C97598B /* Check Pods Manifest.lock */,
+ 63DC840F1BE15179000708E8 /* Sources */,
+ 63DC84101BE15179000708E8 /* Frameworks */,
+ 63DC84111BE15179000708E8 /* Resources */,
+ 4F5690DC0E6AD6663FE78B8B /* Embed Pods Frameworks */,
+ C977426A8727267BBAC7D48E /* Copy Pods Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 63DC841A1BE15179000708E8 /* PBXTargetDependency */,
+ );
+ name = RxLibraryUnitTests;
+ productName = RxLibraryUnitTests;
+ productReference = 63DC84131BE15179000708E8 /* RxLibraryUnitTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+ 63DC84221BE15267000708E8 /* InteropTestsRemote */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 63DC842B1BE15267000708E8 /* Build configuration list for PBXNativeTarget "InteropTestsRemote" */;
+ buildPhases = (
+ 4C406327D3907A5E5FBA8AC9 /* Check Pods Manifest.lock */,
+ 63DC841F1BE15267000708E8 /* Sources */,
+ 63DC84201BE15267000708E8 /* Frameworks */,
+ 63DC84211BE15267000708E8 /* Resources */,
+ 900B6EDD4D16BE7D765C3885 /* Embed Pods Frameworks */,
+ C2E09DC4BD239F71160F0CC1 /* Copy Pods Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 63DC842A1BE15267000708E8 /* PBXTargetDependency */,
+ );
+ name = InteropTestsRemote;
+ productName = InteropTests;
+ productReference = 63DC84231BE15267000708E8 /* InteropTestsRemote.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+ 63DC84331BE15294000708E8 /* InteropTestsLocalSSL */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 63DC843C1BE15294000708E8 /* Build configuration list for PBXNativeTarget "InteropTestsLocalSSL" */;
+ buildPhases = (
+ 5C20DCCB71C3991E6FE78C22 /* Check Pods Manifest.lock */,
+ 63DC84301BE15294000708E8 /* Sources */,
+ 63DC84311BE15294000708E8 /* Frameworks */,
+ 63DC84321BE15294000708E8 /* Resources */,
+ C591129ACE9F6CC5EE03FCDE /* Embed Pods Frameworks */,
+ 693DD0B453431D64EA24FD66 /* Copy Pods Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 63DC843B1BE15294000708E8 /* PBXTargetDependency */,
+ );
+ name = InteropTestsLocalSSL;
+ productName = InteropTestsLocalSSL;
+ productReference = 63DC84341BE15294000708E8 /* InteropTestsLocalSSL.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+ 63DC84421BE152B5000708E8 /* InteropTestsLocalCleartext */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 63DC844B1BE152B5000708E8 /* Build configuration list for PBXNativeTarget "InteropTestsLocalCleartext" */;
+ buildPhases = (
+ 7418AC7B3844B29E48D24FC7 /* Check Pods Manifest.lock */,
+ 63DC843F1BE152B5000708E8 /* Sources */,
+ 63DC84401BE152B5000708E8 /* Frameworks */,
+ 63DC84411BE152B5000708E8 /* Resources */,
+ A8E3AC66DF770B774114A30E /* Embed Pods Frameworks */,
+ 8AD3130D3C58A0FB32FF2A36 /* Copy Pods Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 63DC844A1BE152B5000708E8 /* PBXTargetDependency */,
+ );
+ name = InteropTestsLocalCleartext;
+ productName = InteropTestsLocalCleartext;
+ productReference = 63DC84431BE152B5000708E8 /* InteropTestsLocalCleartext.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
/* End PBXNativeTarget section */
/* Begin PBXProject section */
@@ -195,6 +369,18 @@
635697C61B14FC11007A7283 = {
CreatedOnToolsVersion = 6.3.1;
};
+ 63DC84121BE15179000708E8 = {
+ CreatedOnToolsVersion = 7.0.1;
+ };
+ 63DC84221BE15267000708E8 = {
+ CreatedOnToolsVersion = 7.0.1;
+ };
+ 63DC84331BE15294000708E8 = {
+ CreatedOnToolsVersion = 7.0.1;
+ };
+ 63DC84421BE152B5000708E8 = {
+ CreatedOnToolsVersion = 7.0.1;
+ };
};
};
buildConfigurationList = 635697C21B14FC11007A7283 /* Build configuration list for PBXProject "Tests" */;
@@ -211,6 +397,10 @@
targets = (
635697C61B14FC11007A7283 /* Tests */,
63423F431B150A5F006CF63C /* AllTests */,
+ 63DC84121BE15179000708E8 /* RxLibraryUnitTests */,
+ 63DC84221BE15267000708E8 /* InteropTestsRemote */,
+ 63DC84331BE15294000708E8 /* InteropTestsLocalSSL */,
+ 63DC84421BE152B5000708E8 /* InteropTestsLocalCleartext */,
);
};
/* End PBXProject section */
@@ -224,9 +414,158 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 63DC84111BE15179000708E8 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 63DC84211BE15267000708E8 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 63DC84321BE15294000708E8 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 6379CC531BE17709001BC0A1 /* TestCertificates.bundle in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 63DC84411BE152B5000708E8 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
+ 4C406327D3907A5E5FBA8AC9 /* Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Check Pods Manifest.lock";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
+ showEnvVarsInLog = 0;
+ };
+ 4F5690DC0E6AD6663FE78B8B /* Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Embed Pods Frameworks";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+ 5C20DCCB71C3991E6FE78C22 /* Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Check Pods Manifest.lock";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
+ showEnvVarsInLog = 0;
+ };
+ 5F14F59509E10C2852014F9E /* Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Embed Pods Frameworks";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+ 693DD0B453431D64EA24FD66 /* Copy Pods Resources */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Copy Pods Resources";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+ 7418AC7B3844B29E48D24FC7 /* Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Check Pods Manifest.lock";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
+ showEnvVarsInLog = 0;
+ };
+ 8AD3130D3C58A0FB32FF2A36 /* Copy Pods Resources */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Copy Pods Resources";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+ 900B6EDD4D16BE7D765C3885 /* Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Embed Pods Frameworks";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
914ADDD7106BA9BB8A7E569F /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -257,6 +596,81 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
showEnvVarsInLog = 0;
};
+ A8E3AC66DF770B774114A30E /* Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Embed Pods Frameworks";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+ B2986CEEE8CDD4901C97598B /* Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Check Pods Manifest.lock";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
+ showEnvVarsInLog = 0;
+ };
+ C2E09DC4BD239F71160F0CC1 /* Copy Pods Resources */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Copy Pods Resources";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+ C591129ACE9F6CC5EE03FCDE /* Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Embed Pods Frameworks";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+ C977426A8727267BBAC7D48E /* Copy Pods Resources */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Copy Pods Resources";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -265,11 +679,11 @@
buildActionMask = 2147483647;
files = (
63715F561B780C020029CB0B /* InteropTestsLocalCleartext.m in Sources */,
- 63175DFF1B1B9FAF00027841 /* LocalClearTextTests.m in Sources */,
- 63423F511B151B77006CF63C /* RxLibraryUnitTests.m in Sources */,
+ 6379CC511BE1683B001BC0A1 /* InteropTestsRemote.m in Sources */,
63E240CE1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m in Sources */,
6312AE4E1B1BF49B00341DEE /* GRPCClientTests.m in Sources */,
635ED2EC1B1A3BC400FDE5C3 /* InteropTests.m in Sources */,
+ 63DC842E1BE15278000708E8 /* RxLibraryUnitTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -281,6 +695,42 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 63DC840F1BE15179000708E8 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 63DC841E1BE15180000708E8 /* RxLibraryUnitTests.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 63DC841F1BE15267000708E8 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 63DC842F1BE1527D000708E8 /* InteropTests.m in Sources */,
+ 6379CC501BE16703001BC0A1 /* InteropTestsRemote.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 63DC84301BE15294000708E8 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 63DC844F1BE15353000708E8 /* InteropTestsLocalSSL.m in Sources */,
+ 6379CC4D1BE1662A001BC0A1 /* InteropTests.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 63DC843F1BE152B5000708E8 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 63DC84501BE153AA000708E8 /* GRPCClientTests.m in Sources */,
+ 63DC844E1BE15350000708E8 /* InteropTestsLocalCleartext.m in Sources */,
+ 6379CC4E1BE1662B001BC0A1 /* InteropTests.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
@@ -289,6 +739,26 @@
target = 635697C61B14FC11007A7283 /* Tests */;
targetProxy = 63423F4B1B150A5F006CF63C /* PBXContainerItemProxy */;
};
+ 63DC841A1BE15179000708E8 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 635697C61B14FC11007A7283 /* Tests */;
+ targetProxy = 63DC84191BE15179000708E8 /* PBXContainerItemProxy */;
+ };
+ 63DC842A1BE15267000708E8 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 635697C61B14FC11007A7283 /* Tests */;
+ targetProxy = 63DC84291BE15267000708E8 /* PBXContainerItemProxy */;
+ };
+ 63DC843B1BE15294000708E8 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 635697C61B14FC11007A7283 /* Tests */;
+ targetProxy = 63DC843A1BE15294000708E8 /* PBXContainerItemProxy */;
+ };
+ 63DC844A1BE152B5000708E8 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 635697C61B14FC11007A7283 /* Tests */;
+ targetProxy = 63DC84491BE152B5000708E8 /* PBXContainerItemProxy */;
+ };
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
@@ -418,6 +888,110 @@
};
name = Release;
};
+ 63DC841C1BE15179000708E8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = FF7B5489BCFE40111D768DD0 /* Pods.debug.xcconfig */;
+ buildSettings = {
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_TESTABILITY = YES;
+ INFOPLIST_FILE = Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = io.grpc.RxLibraryUnitTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 63DC841D1BE15179000708E8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 0A4F89D9C90E9C30990218F0 /* Pods.release.xcconfig */;
+ buildSettings = {
+ INFOPLIST_FILE = Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = io.grpc.RxLibraryUnitTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ 63DC842C1BE15267000708E8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = FF7B5489BCFE40111D768DD0 /* Pods.debug.xcconfig */;
+ buildSettings = {
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_TESTABILITY = YES;
+ INFOPLIST_FILE = Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 63DC842D1BE15267000708E8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 0A4F89D9C90E9C30990218F0 /* Pods.release.xcconfig */;
+ buildSettings = {
+ INFOPLIST_FILE = Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ 63DC843D1BE15294000708E8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = FF7B5489BCFE40111D768DD0 /* Pods.debug.xcconfig */;
+ buildSettings = {
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_TESTABILITY = YES;
+ INFOPLIST_FILE = Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalSSL;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 63DC843E1BE15294000708E8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 0A4F89D9C90E9C30990218F0 /* Pods.release.xcconfig */;
+ buildSettings = {
+ INFOPLIST_FILE = Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalSSL;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ 63DC844C1BE152B5000708E8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = FF7B5489BCFE40111D768DD0 /* Pods.debug.xcconfig */;
+ buildSettings = {
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_TESTABILITY = YES;
+ INFOPLIST_FILE = Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalCleartext;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 63DC844D1BE152B5000708E8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 0A4F89D9C90E9C30990218F0 /* Pods.release.xcconfig */;
+ buildSettings = {
+ INFOPLIST_FILE = Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalCleartext;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@@ -448,6 +1022,42 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ 63DC841B1BE15179000708E8 /* Build configuration list for PBXNativeTarget "RxLibraryUnitTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 63DC841C1BE15179000708E8 /* Debug */,
+ 63DC841D1BE15179000708E8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 63DC842B1BE15267000708E8 /* Build configuration list for PBXNativeTarget "InteropTestsRemote" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 63DC842C1BE15267000708E8 /* Debug */,
+ 63DC842D1BE15267000708E8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 63DC843C1BE15294000708E8 /* Build configuration list for PBXNativeTarget "InteropTestsLocalSSL" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 63DC843D1BE15294000708E8 /* Debug */,
+ 63DC843E1BE15294000708E8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 63DC844B1BE152B5000708E8 /* Build configuration list for PBXNativeTarget "InteropTestsLocalCleartext" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 63DC844C1BE152B5000708E8 /* Debug */,
+ 63DC844D1BE152B5000708E8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
/* End XCConfigurationList section */
};
rootObject = 635697BF1B14FC11007A7283 /* Project object */;
diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme
index a7e0ed1..e6a052a 100644
--- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme
+++ b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme
@@ -23,10 +23,10 @@
</BuildActionEntries>
</BuildAction>
<TestAction
+ buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- shouldUseLaunchSchemeArgsEnv = "YES"
- buildConfiguration = "Debug">
+ shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
@@ -45,6 +45,9 @@
Identifier = "GRPCClientTests/testMetadata">
</Test>
<Test
+ Identifier = "InteropTests">
+ </Test>
+ <Test
Identifier = "LocalClearTextTests">
</Test>
<Test
@@ -62,15 +65,18 @@
ReferencedContainer = "container:Tests.xcodeproj">
</BuildableReference>
</MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
</TestAction>
<LaunchAction
+ buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
- buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
@@ -85,10 +91,10 @@
</AdditionalOptions>
</LaunchAction>
<ProfileAction
+ buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
- buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalCleartext.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalCleartext.xcscheme
new file mode 100644
index 0000000..ce358bf
--- /dev/null
+++ b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalCleartext.xcscheme
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0700"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "NO"
+ buildForArchiving = "NO"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "63DC84421BE152B5000708E8"
+ BuildableName = "InteropTestsLocalCleartext.xctest"
+ BlueprintName = "InteropTestsLocalCleartext"
+ ReferencedContainer = "container:Tests.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ <TestableReference
+ skipped = "NO">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "63DC84421BE152B5000708E8"
+ BuildableName = "InteropTestsLocalCleartext.xctest"
+ BlueprintName = "InteropTestsLocalCleartext"
+ ReferencedContainer = "container:Tests.xcodeproj">
+ </BuildableReference>
+ <SkippedTests>
+ <Test
+ Identifier = "GRPCClientTests/testConnectionToRemoteServer">
+ </Test>
+ <Test
+ Identifier = "GRPCClientTests/testMetadata">
+ </Test>
+ <Test
+ Identifier = "InteropTests">
+ </Test>
+ </SkippedTests>
+ </TestableReference>
+ </Testables>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "63DC84421BE152B5000708E8"
+ BuildableName = "InteropTestsLocalCleartext.xctest"
+ BlueprintName = "InteropTestsLocalCleartext"
+ ReferencedContainer = "container:Tests.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "63DC84421BE152B5000708E8"
+ BuildableName = "InteropTestsLocalCleartext.xctest"
+ BlueprintName = "InteropTestsLocalCleartext"
+ ReferencedContainer = "container:Tests.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalSSL.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalSSL.xcscheme
new file mode 100644
index 0000000..f268da1
--- /dev/null
+++ b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalSSL.xcscheme
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0700"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "NO"
+ buildForArchiving = "NO"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "63DC84331BE15294000708E8"
+ BuildableName = "InteropTestsLocalSSL.xctest"
+ BlueprintName = "InteropTestsLocalSSL"
+ ReferencedContainer = "container:Tests.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ <TestableReference
+ skipped = "NO">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "63DC84331BE15294000708E8"
+ BuildableName = "InteropTestsLocalSSL.xctest"
+ BlueprintName = "InteropTestsLocalSSL"
+ ReferencedContainer = "container:Tests.xcodeproj">
+ </BuildableReference>
+ <SkippedTests>
+ <Test
+ Identifier = "InteropTests">
+ </Test>
+ </SkippedTests>
+ </TestableReference>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "63DC84331BE15294000708E8"
+ BuildableName = "InteropTestsLocalSSL.xctest"
+ BlueprintName = "InteropTestsLocalSSL"
+ ReferencedContainer = "container:Tests.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "63DC84331BE15294000708E8"
+ BuildableName = "InteropTestsLocalSSL.xctest"
+ BlueprintName = "InteropTestsLocalSSL"
+ ReferencedContainer = "container:Tests.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemote.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemote.xcscheme
new file mode 100644
index 0000000..186d720
--- /dev/null
+++ b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemote.xcscheme
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0700"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "NO"
+ buildForArchiving = "NO"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "63DC84221BE15267000708E8"
+ BuildableName = "InteropTestsRemote.xctest"
+ BlueprintName = "InteropTestsRemote"
+ ReferencedContainer = "container:Tests.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ <TestableReference
+ skipped = "NO">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "63DC84221BE15267000708E8"
+ BuildableName = "InteropTestsRemote.xctest"
+ BlueprintName = "InteropTestsRemote"
+ ReferencedContainer = "container:Tests.xcodeproj">
+ </BuildableReference>
+ <SkippedTests>
+ <Test
+ Identifier = "InteropTests">
+ </Test>
+ </SkippedTests>
+ </TestableReference>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "63DC84221BE15267000708E8"
+ BuildableName = "InteropTestsRemote.xctest"
+ BlueprintName = "InteropTestsRemote"
+ ReferencedContainer = "container:Tests.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "63DC84221BE15267000708E8"
+ BuildableName = "InteropTestsRemote.xctest"
+ BlueprintName = "InteropTestsRemote"
+ ReferencedContainer = "container:Tests.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/RxLibraryUnitTests.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/RxLibraryUnitTests.xcscheme
new file mode 100644
index 0000000..3abc1d4
--- /dev/null
+++ b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/RxLibraryUnitTests.xcscheme
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0700"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "NO"
+ buildForArchiving = "NO"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "63DC84121BE15179000708E8"
+ BuildableName = "RxLibraryUnitTests.xctest"
+ BlueprintName = "RxLibraryUnitTests"
+ ReferencedContainer = "container:Tests.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ <TestableReference
+ skipped = "NO">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "63DC84121BE15179000708E8"
+ BuildableName = "RxLibraryUnitTests.xctest"
+ BlueprintName = "RxLibraryUnitTests"
+ ReferencedContainer = "container:Tests.xcodeproj">
+ </BuildableReference>
+ </TestableReference>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "63DC84121BE15179000708E8"
+ BuildableName = "RxLibraryUnitTests.xctest"
+ BlueprintName = "RxLibraryUnitTests"
+ ReferencedContainer = "container:Tests.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "63DC84121BE15179000708E8"
+ BuildableName = "RxLibraryUnitTests.xctest"
+ BlueprintName = "RxLibraryUnitTests"
+ ReferencedContainer = "container:Tests.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/src/python/grpcio_test/grpc_test/early_adopter/__init__.py b/src/php/bin/run_php_cs_fixer.sh
old mode 100644
new mode 100755
similarity index 82%
copy from src/python/grpcio_test/grpc_test/early_adopter/__init__.py
copy to src/php/bin/run_php_cs_fixer.sh
index 7086519..3e11a12
--- a/src/python/grpcio_test/grpc_test/early_adopter/__init__.py
+++ b/src/php/bin/run_php_cs_fixer.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
# Copyright 2015, Google Inc.
# All rights reserved.
#
@@ -27,4 +28,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+set -e
+command -v php-cs-fixer > /dev/null || {
+ echo "Cannot find php-cs-fixer. Exiting..."
+ exit 1
+}
+cd $(dirname $0)/..
+php-cs-fixer fix lib/Grpc || true
+php-cs-fixer fix tests/generated_code || true
+php-cs-fixer fix tests/interop || true
+php-cs-fixer fix tests/unit_tests || true
diff --git a/src/php/ext/grpc/credentials.c b/src/php/ext/grpc/credentials.c
index 8e3b7ff..e413070 100644
--- a/src/php/ext/grpc/credentials.c
+++ b/src/php/ext/grpc/credentials.c
@@ -111,21 +111,21 @@
* @return Credentials The new SSL credentials object
*/
PHP_METHOD(Credentials, createSsl) {
- char *pem_root_certs;
+ char *pem_root_certs = NULL;
grpc_ssl_pem_key_cert_pair pem_key_cert_pair;
- int root_certs_length, private_key_length = 0, cert_chain_length = 0;
+ int root_certs_length = 0, private_key_length = 0, cert_chain_length = 0;
pem_key_cert_pair.private_key = pem_key_cert_pair.cert_chain = NULL;
- /* "s|s!s! == 1 string, 2 optional nullable strings */
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s!s!",
+ /* "|s!s!s! == 3 optional nullable strings */
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!s!s!",
&pem_root_certs, &root_certs_length,
&pem_key_cert_pair.private_key, &private_key_length,
&pem_key_cert_pair.cert_chain,
&cert_chain_length) == FAILURE) {
zend_throw_exception(spl_ce_InvalidArgumentException,
- "createSsl expects 1 to 3 strings", 1 TSRMLS_CC);
+ "createSsl expects 3 optional strings", 1 TSRMLS_CC);
return;
}
grpc_credentials *creds = grpc_ssl_credentials_create(
diff --git a/src/php/lib/Grpc/AbstractCall.php b/src/php/lib/Grpc/AbstractCall.php
index a3c7a9e..53849d5 100644
--- a/src/php/lib/Grpc/AbstractCall.php
+++ b/src/php/lib/Grpc/AbstractCall.php
@@ -31,65 +31,79 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
+
namespace Grpc;
-abstract class AbstractCall {
+abstract class AbstractCall
+{
+ protected $call;
+ protected $deserialize;
+ protected $metadata;
- protected $call;
- protected $deserialize;
- protected $metadata;
-
- /**
- * Create a new Call wrapper object.
- * @param Channel $channel The channel to communicate on
- * @param string $method The method to call on the remote server
- * @param callback $deserialize A callback function to deserialize
- * the response
- * @param (optional) long $timeout Timeout in microseconds
- */
- public function __construct(Channel $channel, $method, $deserialize, $timeout = false) {
- if ($timeout) {
- $now = Timeval::now();
- $delta = new Timeval($timeout);
- $deadline = $now->add($delta);
- } else {
- $deadline = Timeval::infFuture();
+ /**
+ * Create a new Call wrapper object.
+ *
+ * @param Channel $channel The channel to communicate on
+ * @param string $method The method to call on the
+ * remote server
+ * @param callback $deserialize A callback function to deserialize
+ * the response
+ * @param (optional) long $timeout Timeout in microseconds
+ */
+ public function __construct(Channel $channel,
+ $method,
+ $deserialize,
+ $timeout = false)
+ {
+ if ($timeout) {
+ $now = Timeval::now();
+ $delta = new Timeval($timeout);
+ $deadline = $now->add($delta);
+ } else {
+ $deadline = Timeval::infFuture();
+ }
+ $this->call = new Call($channel, $method, $deadline);
+ $this->deserialize = $deserialize;
+ $this->metadata = null;
}
- $this->call = new Call($channel, $method, $deadline);
- $this->deserialize = $deserialize;
- $this->metadata = null;
- }
- /**
- * @return The metadata sent by the server.
- */
- public function getMetadata() {
- return $this->metadata;
- }
-
- /**
- * @return string The URI of the endpoint.
- */
- public function getPeer() {
- return $this->call->getPeer();
- }
-
- /**
- * Cancels the call
- */
- public function cancel() {
- $this->call->cancel();
- }
-
- /**
- * Deserialize a response value to an object.
- * @param string $value The binary value to deserialize
- * @return The deserialized value
- */
- protected function deserializeResponse($value) {
- if ($value === null) {
- return null;
+ /**
+ * @return The metadata sent by the server.
+ */
+ public function getMetadata()
+ {
+ return $this->metadata;
}
- return call_user_func($this->deserialize, $value);
- }
+
+ /**
+ * @return string The URI of the endpoint.
+ */
+ public function getPeer()
+ {
+ return $this->call->getPeer();
+ }
+
+ /**
+ * Cancels the call.
+ */
+ public function cancel()
+ {
+ $this->call->cancel();
+ }
+
+ /**
+ * Deserialize a response value to an object.
+ *
+ * @param string $value The binary value to deserialize
+ *
+ * @return The deserialized value
+ */
+ protected function deserializeResponse($value)
+ {
+ if ($value === null) {
+ return;
+ }
+
+ return call_user_func($this->deserialize, $value);
+ }
}
diff --git a/src/php/lib/Grpc/BaseStub.php b/src/php/lib/Grpc/BaseStub.php
index 5614314..c26be60 100755
--- a/src/php/lib/Grpc/BaseStub.php
+++ b/src/php/lib/Grpc/BaseStub.php
@@ -31,255 +31,308 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
+
namespace Grpc;
/**
* Base class for generated client stubs. Stub methods are expected to call
* _simpleRequest or _streamRequest and return the result.
*/
-class BaseStub {
+class BaseStub
+{
+ private $hostname;
+ private $channel;
- private $hostname;
- private $channel;
+ // a callback function
+ private $update_metadata;
- // a callback function
- private $update_metadata;
-
- /**
- * @param $hostname string
- * @param $opts array
- * - 'update_metadata': (optional) a callback function which takes in a
- * metadata array, and returns an updated metadata array
- */
- public function __construct($hostname, $opts) {
- $this->hostname = $hostname;
- $this->update_metadata = null;
- if (isset($opts['update_metadata'])) {
- if (is_callable($opts['update_metadata'])) {
- $this->update_metadata = $opts['update_metadata'];
- }
- unset($opts['update_metadata']);
- }
- $package_config = json_decode(
- file_get_contents(dirname(__FILE__) . '/../../composer.json'), true);
- $opts['grpc.primary_user_agent'] =
- 'grpc-php/' . $package_config['version'];
- $this->channel = new Channel($hostname, $opts);
- }
-
- /**
- * @return string The URI of the endpoint.
- */
- public function getTarget() {
- return $this->channel->getTarget();
- }
-
- /**
- * @param $try_to_connect bool
- * @return int The grpc connectivity state
- */
- public function getConnectivityState($try_to_connect = false) {
- return $this->channel->getConnectivityState($try_to_connect);
- }
-
- /**
- * @param $timeout in microseconds
- * @return bool true if channel is ready
- * @throw Exception if channel is in FATAL_ERROR state
- */
- public function waitForReady($timeout) {
- $new_state = $this->getConnectivityState(true);
- if ($this->_checkConnectivityState($new_state)) {
- return true;
+ /**
+ * @param $hostname string
+ * @param $opts array
+ * - 'update_metadata': (optional) a callback function which takes in a
+ * metadata array, and returns an updated metadata array
+ */
+ public function __construct($hostname, $opts)
+ {
+ $this->hostname = $hostname;
+ $this->update_metadata = null;
+ if (isset($opts['update_metadata'])) {
+ if (is_callable($opts['update_metadata'])) {
+ $this->update_metadata = $opts['update_metadata'];
+ }
+ unset($opts['update_metadata']);
+ }
+ $package_config = json_decode(
+ file_get_contents(dirname(__FILE__).'/../../composer.json'), true);
+ $opts['grpc.primary_user_agent'] =
+ 'grpc-php/'.$package_config['version'];
+ $this->channel = new Channel($hostname, $opts);
}
- $now = Timeval::now();
- $delta = new Timeval($timeout);
- $deadline = $now->add($delta);
-
- while ($this->channel->watchConnectivityState($new_state, $deadline)) {
- // state has changed before deadline
- $new_state = $this->getConnectivityState();
- if ($this->_checkConnectivityState($new_state)) {
- return true;
- }
+ /**
+ * @return string The URI of the endpoint.
+ */
+ public function getTarget()
+ {
+ return $this->channel->getTarget();
}
- // deadline has passed
- $new_state = $this->getConnectivityState();
- return $this->_checkConnectivityState($new_state);
- }
- private function _checkConnectivityState($new_state) {
- if ($new_state == \Grpc\CHANNEL_READY) {
- return true;
+ /**
+ * @param $try_to_connect bool
+ *
+ * @return int The grpc connectivity state
+ */
+ public function getConnectivityState($try_to_connect = false)
+ {
+ return $this->channel->getConnectivityState($try_to_connect);
}
- if ($new_state == \Grpc\CHANNEL_FATAL_FAILURE) {
- // @codeCoverageIgnoreStart
- throw new \Exception('Failed to connect to server');
- // @codeCoverageIgnoreEnd
+
+ /**
+ * @param $timeout in microseconds
+ *
+ * @return bool true if channel is ready
+ * @throw Exception if channel is in FATAL_ERROR state
+ */
+ public function waitForReady($timeout)
+ {
+ $new_state = $this->getConnectivityState(true);
+ if ($this->_checkConnectivityState($new_state)) {
+ return true;
+ }
+
+ $now = Timeval::now();
+ $delta = new Timeval($timeout);
+ $deadline = $now->add($delta);
+
+ while ($this->channel->watchConnectivityState($new_state, $deadline)) {
+ // state has changed before deadline
+ $new_state = $this->getConnectivityState();
+ if ($this->_checkConnectivityState($new_state)) {
+ return true;
+ }
+ }
+ // deadline has passed
+ $new_state = $this->getConnectivityState();
+
+ return $this->_checkConnectivityState($new_state);
}
- return false;
- }
- /**
- * Close the communication channel associated with this stub
- */
- public function close() {
- $this->channel->close();
- }
+ private function _checkConnectivityState($new_state)
+ {
+ if ($new_state == \Grpc\CHANNEL_READY) {
+ return true;
+ }
+ if ($new_state == \Grpc\CHANNEL_FATAL_FAILURE) {
+ throw new \Exception('Failed to connect to server');
+ }
- /**
- * constructs the auth uri for the jwt
- */
- private function _get_jwt_aud_uri($method) {
- $last_slash_idx = strrpos($method, '/');
- if ($last_slash_idx === false) {
- throw new \InvalidArgumentException('service name must have a slash');
+ return false;
}
- $service_name = substr($method, 0, $last_slash_idx);
- return "https://" . $this->hostname . $service_name;
- }
- /**
- * extract $timeout from $metadata
- * @param $metadata The metadata map
- * @return list($metadata_copy, $timeout)
- */
- private function _extract_timeout_from_metadata($metadata) {
- $timeout = false;
- $metadata_copy = $metadata;
- if (isset($metadata['timeout'])) {
- $timeout = $metadata['timeout'];
- unset($metadata_copy['timeout']);
+ /**
+ * Close the communication channel associated with this stub.
+ */
+ public function close()
+ {
+ $this->channel->close();
}
- return array($metadata_copy, $timeout);
- }
- /**
- * validate and normalize the metadata array
- * @param $metadata The metadata map
- * @return $metadata Validated and key-normalized metadata map
- * @throw InvalidArgumentException if key contains invalid characters
- */
- private function _validate_and_normalize_metadata($metadata) {
- $metadata_copy = array();
- foreach ($metadata as $key => $value) {
- if (!preg_match('/^[A-Za-z\d_-]+$/', $key)) {
- throw new \InvalidArgumentException(
- 'Metadata keys must be nonempty strings containing only '.
- 'alphanumeric characters, hyphens and underscores');
- }
- $metadata_copy[strtolower($key)] = $value;
+ /**
+ * constructs the auth uri for the jwt.
+ */
+ private function _get_jwt_aud_uri($method)
+ {
+ $last_slash_idx = strrpos($method, '/');
+ if ($last_slash_idx === false) {
+ throw new \InvalidArgumentException(
+ 'service name must have a slash');
+ }
+ $service_name = substr($method, 0, $last_slash_idx);
+
+ return 'https://'.$this->hostname.$service_name;
}
- return $metadata_copy;
- }
- /* This class is intended to be subclassed by generated code, so all functions
- begin with "_" to avoid name collisions. */
+ /**
+ * extract $timeout from $metadata.
+ *
+ * @param $metadata The metadata map
+ *
+ * @return list($metadata_copy, $timeout)
+ */
+ private function _extract_timeout_from_metadata($metadata)
+ {
+ $timeout = false;
+ $metadata_copy = $metadata;
+ if (isset($metadata['timeout'])) {
+ $timeout = $metadata['timeout'];
+ unset($metadata_copy['timeout']);
+ }
- /**
- * Call a remote method that takes a single argument and has a single output
- *
- * @param string $method The name of the method to call
- * @param $argument The argument to the method
- * @param callable $deserialize A function that deserializes the response
- * @param array $metadata A metadata map to send to the server
- * @return SimpleSurfaceActiveCall The active call object
- */
- public function _simpleRequest($method,
- $argument,
+ return [$metadata_copy, $timeout];
+ }
+
+ /**
+ * validate and normalize the metadata array.
+ *
+ * @param $metadata The metadata map
+ *
+ * @return $metadata Validated and key-normalized metadata map
+ * @throw InvalidArgumentException if key contains invalid characters
+ */
+ private function _validate_and_normalize_metadata($metadata)
+ {
+ $metadata_copy = [];
+ foreach ($metadata as $key => $value) {
+ if (!preg_match('/^[A-Za-z\d_-]+$/', $key)) {
+ throw new \InvalidArgumentException(
+ 'Metadata keys must be nonempty strings containing only '.
+ 'alphanumeric characters, hyphens and underscores');
+ }
+ $metadata_copy[strtolower($key)] = $value;
+ }
+
+ return $metadata_copy;
+ }
+
+ /* This class is intended to be subclassed by generated code, so
+ * all functions begin with "_" to avoid name collisions. */
+
+ /**
+ * Call a remote method that takes a single argument and has a
+ * single output.
+ *
+ * @param string $method The name of the method to call
+ * @param $argument The argument to the method
+ * @param callable $deserialize A function that deserializes the response
+ * @param array $metadata A metadata map to send to the server
+ *
+ * @return SimpleSurfaceActiveCall The active call object
+ */
+ public function _simpleRequest($method,
+ $argument,
+ callable $deserialize,
+ $metadata = [],
+ $options = [])
+ {
+ list($actual_metadata, $timeout) =
+ $this->_extract_timeout_from_metadata($metadata);
+ $call = new UnaryCall($this->channel,
+ $method,
+ $deserialize,
+ $timeout);
+ $jwt_aud_uri = $this->_get_jwt_aud_uri($method);
+ if (is_callable($this->update_metadata)) {
+ $actual_metadata = call_user_func($this->update_metadata,
+ $actual_metadata,
+ $jwt_aud_uri);
+ }
+ $actual_metadata = $this->_validate_and_normalize_metadata(
+ $actual_metadata);
+ $call->start($argument, $actual_metadata, $options);
+
+ return $call;
+ }
+
+ /**
+ * Call a remote method that takes a stream of arguments and has a single
+ * output.
+ *
+ * @param string $method The name of the method to call
+ * @param $arguments An array or Traversable of arguments to stream to the
+ * server
+ * @param callable $deserialize A function that deserializes the response
+ * @param array $metadata A metadata map to send to the server
+ *
+ * @return ClientStreamingSurfaceActiveCall The active call object
+ */
+ public function _clientStreamRequest($method,
+ callable $deserialize,
+ $metadata = [])
+ {
+ list($actual_metadata, $timeout) =
+ $this->_extract_timeout_from_metadata($metadata);
+ $call = new ClientStreamingCall($this->channel,
+ $method,
+ $deserialize,
+ $timeout);
+ $jwt_aud_uri = $this->_get_jwt_aud_uri($method);
+ if (is_callable($this->update_metadata)) {
+ $actual_metadata = call_user_func($this->update_metadata,
+ $actual_metadata,
+ $jwt_aud_uri);
+ }
+ $actual_metadata = $this->_validate_and_normalize_metadata(
+ $actual_metadata);
+ $call->start($actual_metadata);
+
+ return $call;
+ }
+
+ /**
+ * Call a remote method that takes a single argument and returns a stream of
+ * responses.
+ *
+ * @param string $method The name of the method to call
+ * @param $argument The argument to the method
+ * @param callable $deserialize A function that deserializes the responses
+ * @param array $metadata A metadata map to send to the server
+ *
+ * @return ServerStreamingSurfaceActiveCall The active call object
+ */
+ public function _serverStreamRequest($method,
+ $argument,
+ callable $deserialize,
+ $metadata = [],
+ $options = [])
+ {
+ list($actual_metadata, $timeout) =
+ $this->_extract_timeout_from_metadata($metadata);
+ $call = new ServerStreamingCall($this->channel,
+ $method,
+ $deserialize,
+ $timeout);
+ $jwt_aud_uri = $this->_get_jwt_aud_uri($method);
+ if (is_callable($this->update_metadata)) {
+ $actual_metadata = call_user_func($this->update_metadata,
+ $actual_metadata,
+ $jwt_aud_uri);
+ }
+ $actual_metadata = $this->_validate_and_normalize_metadata(
+ $actual_metadata);
+ $call->start($argument, $actual_metadata, $options);
+
+ return $call;
+ }
+
+ /**
+ * Call a remote method with messages streaming in both directions.
+ *
+ * @param string $method The name of the method to call
+ * @param callable $deserialize A function that deserializes the responses
+ * @param array $metadata A metadata map to send to the server
+ *
+ * @return BidiStreamingSurfaceActiveCall The active call object
+ */
+ public function _bidiRequest($method,
callable $deserialize,
- $metadata = array(),
- $options = array()) {
- list($actual_metadata, $timeout) = $this->_extract_timeout_from_metadata($metadata);
- $call = new UnaryCall($this->channel, $method, $deserialize, $timeout);
- $jwt_aud_uri = $this->_get_jwt_aud_uri($method);
- if (is_callable($this->update_metadata)) {
- $actual_metadata = call_user_func($this->update_metadata,
+ $metadata = [])
+ {
+ list($actual_metadata, $timeout) =
+ $this->_extract_timeout_from_metadata($metadata);
+ $call = new BidiStreamingCall($this->channel,
+ $method,
+ $deserialize,
+ $timeout);
+ $jwt_aud_uri = $this->_get_jwt_aud_uri($method);
+ if (is_callable($this->update_metadata)) {
+ $actual_metadata = call_user_func($this->update_metadata,
$actual_metadata,
$jwt_aud_uri);
- }
- $actual_metadata = $this->_validate_and_normalize_metadata($actual_metadata);
- $call->start($argument, $actual_metadata, $options);
- return $call;
- }
+ }
+ $actual_metadata = $this->_validate_and_normalize_metadata(
+ $actual_metadata);
+ $call->start($actual_metadata);
- /**
- * Call a remote method that takes a stream of arguments and has a single
- * output
- *
- * @param string $method The name of the method to call
- * @param $arguments An array or Traversable of arguments to stream to the
- * server
- * @param callable $deserialize A function that deserializes the response
- * @param array $metadata A metadata map to send to the server
- * @return ClientStreamingSurfaceActiveCall The active call object
- */
- public function _clientStreamRequest($method,
- callable $deserialize,
- $metadata = array()) {
- list($actual_metadata, $timeout) = $this->_extract_timeout_from_metadata($metadata);
- $call = new ClientStreamingCall($this->channel, $method, $deserialize, $timeout);
- $jwt_aud_uri = $this->_get_jwt_aud_uri($method);
- if (is_callable($this->update_metadata)) {
- $actual_metadata = call_user_func($this->update_metadata,
- $actual_metadata,
- $jwt_aud_uri);
+ return $call;
}
- $actual_metadata = $this->_validate_and_normalize_metadata($actual_metadata);
- $call->start($actual_metadata);
- return $call;
- }
-
- /**
- * Call a remote method that takes a single argument and returns a stream of
- * responses
- *
- * @param string $method The name of the method to call
- * @param $argument The argument to the method
- * @param callable $deserialize A function that deserializes the responses
- * @param array $metadata A metadata map to send to the server
- * @return ServerStreamingSurfaceActiveCall The active call object
- */
- public function _serverStreamRequest($method,
- $argument,
- callable $deserialize,
- $metadata = array(),
- $options = array()) {
- list($actual_metadata, $timeout) = $this->_extract_timeout_from_metadata($metadata);
- $call = new ServerStreamingCall($this->channel, $method, $deserialize, $timeout);
- $jwt_aud_uri = $this->_get_jwt_aud_uri($method);
- if (is_callable($this->update_metadata)) {
- $actual_metadata = call_user_func($this->update_metadata,
- $actual_metadata,
- $jwt_aud_uri);
- }
- $actual_metadata = $this->_validate_and_normalize_metadata($actual_metadata);
- $call->start($argument, $actual_metadata, $options);
- return $call;
- }
-
- /**
- * Call a remote method with messages streaming in both directions
- *
- * @param string $method The name of the method to call
- * @param callable $deserialize A function that deserializes the responses
- * @param array $metadata A metadata map to send to the server
- * @return BidiStreamingSurfaceActiveCall The active call object
- */
- public function _bidiRequest($method,
- callable $deserialize,
- $metadata = array()) {
- list($actual_metadata, $timeout) = $this->_extract_timeout_from_metadata($metadata);
- $call = new BidiStreamingCall($this->channel, $method, $deserialize, $timeout);
- $jwt_aud_uri = $this->_get_jwt_aud_uri($method);
- if (is_callable($this->update_metadata)) {
- $actual_metadata = call_user_func($this->update_metadata,
- $actual_metadata,
- $jwt_aud_uri);
- }
- $actual_metadata = $this->_validate_and_normalize_metadata($actual_metadata);
- $call->start($actual_metadata);
- return $call;
- }
}
diff --git a/src/php/lib/Grpc/BidiStreamingCall.php b/src/php/lib/Grpc/BidiStreamingCall.php
index c432fd5..bf813c1 100644
--- a/src/php/lib/Grpc/BidiStreamingCall.php
+++ b/src/php/lib/Grpc/BidiStreamingCall.php
@@ -31,68 +31,87 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
+
namespace Grpc;
/**
* Represents an active call that allows for sending and recieving messages in
* streams in any order.
*/
-class BidiStreamingCall extends AbstractCall {
- /**
- * Start the call
- * @param array $metadata Metadata to send with the call, if applicable
- */
- public function start($metadata = array()) {
- $this->call->startBatch([OP_SEND_INITIAL_METADATA => $metadata]);
- }
-
- /**
- * Reads the next value from the server.
- * @return The next value from the server, or null if there is none
- */
- public function read() {
- $batch = [OP_RECV_MESSAGE => true];
- if ($this->metadata === null) {
- $batch[OP_RECV_INITIAL_METADATA] = true;
+class BidiStreamingCall extends AbstractCall
+{
+ /**
+ * Start the call.
+ *
+ * @param array $metadata Metadata to send with the call, if applicable
+ */
+ public function start($metadata = [])
+ {
+ $this->call->startBatch([
+ OP_SEND_INITIAL_METADATA => $metadata,
+ ]);
}
- $read_event = $this->call->startBatch($batch);
- if ($this->metadata === null) {
- $this->metadata = $read_event->metadata;
+
+ /**
+ * Reads the next value from the server.
+ *
+ * @return The next value from the server, or null if there is none
+ */
+ public function read()
+ {
+ $batch = [OP_RECV_MESSAGE => true];
+ if ($this->metadata === null) {
+ $batch[OP_RECV_INITIAL_METADATA] = true;
+ }
+ $read_event = $this->call->startBatch($batch);
+ if ($this->metadata === null) {
+ $this->metadata = $read_event->metadata;
+ }
+
+ return $this->deserializeResponse($read_event->message);
}
- return $this->deserializeResponse($read_event->message);
- }
- /**
- * Write a single message to the server. This cannot be called after
- * writesDone is called.
- * @param ByteBuffer $data The data to write
- * @param array $options an array of options, possible keys:
- * 'flags' => a number
- */
- public function write($data, $options = array()) {
- $message_array = ['message' => $data->serialize()];
- if (isset($options['flags'])) {
- $message_array['flags'] = $options['flags'];
+ /**
+ * Write a single message to the server. This cannot be called after
+ * writesDone is called.
+ *
+ * @param ByteBuffer $data The data to write
+ * @param array $options an array of options, possible keys:
+ * 'flags' => a number
+ */
+ public function write($data, $options = [])
+ {
+ $message_array = ['message' => $data->serialize()];
+ if (isset($options['flags'])) {
+ $message_array['flags'] = $options['flags'];
+ }
+ $this->call->startBatch([
+ OP_SEND_MESSAGE => $message_array,
+ ]);
}
- $this->call->startBatch([OP_SEND_MESSAGE => $message_array]);
- }
- /**
- * Indicate that no more writes will be sent.
- */
- public function writesDone() {
- $this->call->startBatch([OP_SEND_CLOSE_FROM_CLIENT => true]);
- }
+ /**
+ * Indicate that no more writes will be sent.
+ */
+ public function writesDone()
+ {
+ $this->call->startBatch([
+ OP_SEND_CLOSE_FROM_CLIENT => true,
+ ]);
+ }
- /**
- * Wait for the server to send the status, and return it.
- * @return object The status object, with integer $code, string $details,
- * and array $metadata members
- */
- public function getStatus() {
- $status_event = $this->call->startBatch([
- OP_RECV_STATUS_ON_CLIENT => true
- ]);
- return $status_event->status;
- }
-}
\ No newline at end of file
+ /**
+ * Wait for the server to send the status, and return it.
+ *
+ * @return object The status object, with integer $code, string $details,
+ * and array $metadata members
+ */
+ public function getStatus()
+ {
+ $status_event = $this->call->startBatch([
+ OP_RECV_STATUS_ON_CLIENT => true,
+ ]);
+
+ return $status_event->status;
+ }
+}
diff --git a/src/php/lib/Grpc/ClientStreamingCall.php b/src/php/lib/Grpc/ClientStreamingCall.php
index b96c17e..500cfe0 100644
--- a/src/php/lib/Grpc/ClientStreamingCall.php
+++ b/src/php/lib/Grpc/ClientStreamingCall.php
@@ -31,47 +31,61 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
+
namespace Grpc;
/**
* Represents an active call that sends a stream of messages and then gets a
* single response.
*/
-class ClientStreamingCall extends AbstractCall {
- /**
- * Start the call.
- * @param array $metadata Metadata to send with the call, if applicable
- */
- public function start($metadata = array()) {
- $this->call->startBatch([OP_SEND_INITIAL_METADATA => $metadata]);
- }
-
- /**
- * Write a single message to the server. This cannot be called after
- * wait is called.
- * @param ByteBuffer $data The data to write
- * @param array $options an array of options, possible keys:
- * 'flags' => a number
- */
- public function write($data, $options = array()) {
- $message_array = ['message' => $data->serialize()];
- if (isset($options['flags'])) {
- $message_array['flags'] = $options['flags'];
+class ClientStreamingCall extends AbstractCall
+{
+ /**
+ * Start the call.
+ *
+ * @param array $metadata Metadata to send with the call, if applicable
+ */
+ public function start($metadata = [])
+ {
+ $this->call->startBatch([
+ OP_SEND_INITIAL_METADATA => $metadata,
+ ]);
}
- $this->call->startBatch([OP_SEND_MESSAGE => $message_array]);
- }
- /**
- * Wait for the server to respond with data and a status
- * @return [response data, status]
- */
- public function wait() {
- $event = $this->call->startBatch([
- OP_SEND_CLOSE_FROM_CLIENT => true,
- OP_RECV_INITIAL_METADATA => true,
- OP_RECV_MESSAGE => true,
- OP_RECV_STATUS_ON_CLIENT => true]);
- $this->metadata = $event->metadata;
- return array($this->deserializeResponse($event->message), $event->status);
- }
-}
\ No newline at end of file
+ /**
+ * Write a single message to the server. This cannot be called after
+ * wait is called.
+ *
+ * @param ByteBuffer $data The data to write
+ * @param array $options an array of options, possible keys:
+ * 'flags' => a number
+ */
+ public function write($data, $options = [])
+ {
+ $message_array = ['message' => $data->serialize()];
+ if (isset($options['flags'])) {
+ $message_array['flags'] = $options['flags'];
+ }
+ $this->call->startBatch([
+ OP_SEND_MESSAGE => $message_array,
+ ]);
+ }
+
+ /**
+ * Wait for the server to respond with data and a status.
+ *
+ * @return [response data, status]
+ */
+ public function wait()
+ {
+ $event = $this->call->startBatch([
+ OP_SEND_CLOSE_FROM_CLIENT => true,
+ OP_RECV_INITIAL_METADATA => true,
+ OP_RECV_MESSAGE => true,
+ OP_RECV_STATUS_ON_CLIENT => true,
+ ]);
+ $this->metadata = $event->metadata;
+
+ return [$this->deserializeResponse($event->message), $event->status];
+ }
+}
diff --git a/src/php/lib/Grpc/ServerStreamingCall.php b/src/php/lib/Grpc/ServerStreamingCall.php
index a93c1a5..da48523 100644
--- a/src/php/lib/Grpc/ServerStreamingCall.php
+++ b/src/php/lib/Grpc/ServerStreamingCall.php
@@ -31,53 +31,66 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
+
namespace Grpc;
/**
* Represents an active call that sends a single message and then gets a stream
- * of reponses
+ * of reponses.
*/
-class ServerStreamingCall extends AbstractCall {
- /**
- * Start the call
- * @param $data The data to send
- * @param array $metadata Metadata to send with the call, if applicable
- * @param array $options an array of options, possible keys:
- * 'flags' => a number
- */
- public function start($data, $metadata = array(), $options = array()) {
- $message_array = ['message' => $data->serialize()];
- if (isset($options['flags'])) {
- $message_array['flags'] = $options['flags'];
+class ServerStreamingCall extends AbstractCall
+{
+ /**
+ * Start the call.
+ *
+ * @param $data The data to send
+ * @param array $metadata Metadata to send with the call, if applicable
+ * @param array $options an array of options, possible keys:
+ * 'flags' => a number
+ */
+ public function start($data, $metadata = [], $options = [])
+ {
+ $message_array = ['message' => $data->serialize()];
+ if (isset($options['flags'])) {
+ $message_array['flags'] = $options['flags'];
+ }
+ $event = $this->call->startBatch([
+ OP_SEND_INITIAL_METADATA => $metadata,
+ OP_RECV_INITIAL_METADATA => true,
+ OP_SEND_MESSAGE => $message_array,
+ OP_SEND_CLOSE_FROM_CLIENT => true,
+ ]);
+ $this->metadata = $event->metadata;
}
- $event = $this->call->startBatch([
- OP_SEND_INITIAL_METADATA => $metadata,
- OP_RECV_INITIAL_METADATA => true,
- OP_SEND_MESSAGE => $message_array,
- OP_SEND_CLOSE_FROM_CLIENT => true]);
- $this->metadata = $event->metadata;
- }
- /**
- * @return An iterator of response values
- */
- public function responses() {
- $response = $this->call->startBatch([OP_RECV_MESSAGE => true])->message;
- while($response !== null) {
- yield $this->deserializeResponse($response);
- $response = $this->call->startBatch([OP_RECV_MESSAGE => true])->message;
+ /**
+ * @return An iterator of response values
+ */
+ public function responses()
+ {
+ $response = $this->call->startBatch([
+ OP_RECV_MESSAGE => true,
+ ])->message;
+ while ($response !== null) {
+ yield $this->deserializeResponse($response);
+ $response = $this->call->startBatch([
+ OP_RECV_MESSAGE => true,
+ ])->message;
+ }
}
- }
- /**
- * Wait for the server to send the status, and return it.
- * @return object The status object, with integer $code, string $details,
- * and array $metadata members
- */
- public function getStatus() {
- $status_event = $this->call->startBatch([
- OP_RECV_STATUS_ON_CLIENT => true
- ]);
- return $status_event->status;
- }
+ /**
+ * Wait for the server to send the status, and return it.
+ *
+ * @return object The status object, with integer $code, string $details,
+ * and array $metadata members
+ */
+ public function getStatus()
+ {
+ $status_event = $this->call->startBatch([
+ OP_RECV_STATUS_ON_CLIENT => true,
+ ]);
+
+ return $status_event->status;
+ }
}
diff --git a/src/php/lib/Grpc/UnaryCall.php b/src/php/lib/Grpc/UnaryCall.php
index 38af6b1..b57903d 100644
--- a/src/php/lib/Grpc/UnaryCall.php
+++ b/src/php/lib/Grpc/UnaryCall.php
@@ -31,41 +31,50 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
+
namespace Grpc;
/**
* Represents an active call that sends a single message and then gets a single
* response.
*/
-class UnaryCall extends AbstractCall {
- /**
- * Start the call
- * @param $data The data to send
- * @param array $metadata Metadata to send with the call, if applicable
- * @param array $options an array of options, possible keys:
- * 'flags' => a number
- */
- public function start($data, $metadata = array(), $options = array()) {
- $message_array = ['message' => $data->serialize()];
- if (isset($options['flags'])) {
- $message_array['flags'] = $options['flags'];
+class UnaryCall extends AbstractCall
+{
+ /**
+ * Start the call.
+ *
+ * @param $data The data to send
+ * @param array $metadata Metadata to send with the call, if applicable
+ * @param array $options an array of options, possible keys:
+ * 'flags' => a number
+ */
+ public function start($data, $metadata = [], $options = [])
+ {
+ $message_array = ['message' => $data->serialize()];
+ if (isset($options['flags'])) {
+ $message_array['flags'] = $options['flags'];
+ }
+ $event = $this->call->startBatch([
+ OP_SEND_INITIAL_METADATA => $metadata,
+ OP_RECV_INITIAL_METADATA => true,
+ OP_SEND_MESSAGE => $message_array,
+ OP_SEND_CLOSE_FROM_CLIENT => true,
+ ]);
+ $this->metadata = $event->metadata;
}
- $event = $this->call->startBatch([
- OP_SEND_INITIAL_METADATA => $metadata,
- OP_RECV_INITIAL_METADATA => true,
- OP_SEND_MESSAGE => $message_array,
- OP_SEND_CLOSE_FROM_CLIENT => true]);
- $this->metadata = $event->metadata;
- }
- /**
- * Wait for the server to respond with data and a status
- * @return [response data, status]
- */
- public function wait() {
- $event = $this->call->startBatch([
- OP_RECV_MESSAGE => true,
- OP_RECV_STATUS_ON_CLIENT => true]);
- return array($this->deserializeResponse($event->message), $event->status);
- }
+ /**
+ * Wait for the server to respond with data and a status.
+ *
+ * @return [response data, status]
+ */
+ public function wait()
+ {
+ $event = $this->call->startBatch([
+ OP_RECV_MESSAGE => true,
+ OP_RECV_STATUS_ON_CLIENT => true,
+ ]);
+
+ return [$this->deserializeResponse($event->message), $event->status];
+ }
}
diff --git a/src/php/tests/generated_code/AbstractGeneratedCodeTest.php b/src/php/tests/generated_code/AbstractGeneratedCodeTest.php
index 1819e40..4a0bd6a 100644
--- a/src/php/tests/generated_code/AbstractGeneratedCodeTest.php
+++ b/src/php/tests/generated_code/AbstractGeneratedCodeTest.php
@@ -31,184 +31,212 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-require_once realpath(dirname(__FILE__) . '/../../vendor/autoload.php');
-require_once dirname(__FILE__) . '/math.php';
+require_once realpath(dirname(__FILE__).'/../../vendor/autoload.php');
+require_once dirname(__FILE__).'/math.php';
-abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase {
- /* These tests require that a server exporting the math service must be
- * running on $GRPC_TEST_HOST */
- protected static $client;
- protected static $timeout;
+abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase
+{
+ /**
+ * These tests require that a server exporting the math service must be
+ * running on $GRPC_TEST_HOST.
+ */
+ protected static $client;
+ protected static $timeout;
- public function testWaitForNotReady() {
- $this->assertFalse(self::$client->waitForReady(1));
- }
-
- public function testWaitForReady() {
- $this->assertTrue(self::$client->waitForReady(250000));
- }
-
- public function testAlreadyReady() {
- $this->assertTrue(self::$client->waitForReady(250000));
- $this->assertTrue(self::$client->waitForReady(100));
- }
-
- public function testGetTarget() {
- $this->assertTrue(is_string(self::$client->getTarget()));
- }
-
- /**
- * @expectedException InvalidArgumentException
- */
- public function testClose() {
- self::$client->close();
- $div_arg = new math\DivArgs();
- $call = self::$client->Div($div_arg);
- }
-
- /**
- * @expectedException InvalidArgumentException
- */
- public function testInvalidMetadata() {
- $div_arg = new math\DivArgs();
- $call = self::$client->Div($div_arg, array(' ' => 'abc123'));
- }
-
- public function testGetCallMetadata() {
- $div_arg = new math\DivArgs();
- $call = self::$client->Div($div_arg);
- $this->assertTrue(is_array($call->getMetadata()));
- }
-
- public function testTimeout() {
- $div_arg = new math\DivArgs();
- $call = self::$client->Div($div_arg, array('timeout' => 100));
- list($response, $status) = $call->wait();
- $this->assertSame(\Grpc\STATUS_DEADLINE_EXCEEDED, $status->code);
- }
-
- public function testCancel() {
- $div_arg = new math\DivArgs();
- $call = self::$client->Div($div_arg);
- $call->cancel();
- list($response, $status) = $call->wait();
- $this->assertSame(\Grpc\STATUS_CANCELLED, $status->code);
- }
-
- /**
- * @expectedException InvalidArgumentException
- */
- public function testInvalidMethodName() {
- $invalid_client = new DummyInvalidClient('host', array());
- $div_arg = new math\DivArgs();
- $invalid_client->InvalidUnaryCall($div_arg);
- }
-
- public function testWriteFlags() {
- $div_arg = new math\DivArgs();
- $div_arg->setDividend(7);
- $div_arg->setDivisor(4);
- $call = self::$client->Div($div_arg, array(), array('flags' => Grpc\WRITE_NO_COMPRESS));
- $this->assertTrue(is_string($call->getPeer()));
- list($response, $status) = $call->wait();
- $this->assertSame(1, $response->getQuotient());
- $this->assertSame(3, $response->getRemainder());
- $this->assertSame(\Grpc\STATUS_OK, $status->code);
- }
-
- public function testWriteFlagsServerStreaming() {
- $fib_arg = new math\FibArgs();
- $fib_arg->setLimit(7);
- $call = self::$client->Fib($fib_arg, array(), array('flags' => Grpc\WRITE_NO_COMPRESS));
- $result_array = iterator_to_array($call->responses());
- $status = $call->getStatus();
- $this->assertSame(\Grpc\STATUS_OK, $status->code);
- }
-
- public function testWriteFlagsClientStreaming() {
- $call = self::$client->Sum();
- $num = new math\Num();
- $num->setNum(1);
- $call->write($num, array('flags' => Grpc\WRITE_NO_COMPRESS));
- list($response, $status) = $call->wait();
- $this->assertSame(\Grpc\STATUS_OK, $status->code);
- }
-
- public function testWriteFlagsBidiStreaming() {
- $call = self::$client->DivMany();
- $div_arg = new math\DivArgs();
- $div_arg->setDividend(7);
- $div_arg->setDivisor(4);
- $call->write($div_arg, array('flags' => Grpc\WRITE_NO_COMPRESS));
- $response = $call->read();
- $call->writesDone();
- $status = $call->getStatus();
- $this->assertSame(\Grpc\STATUS_OK, $status->code);
- }
-
- public function testSimpleRequest() {
- $div_arg = new math\DivArgs();
- $div_arg->setDividend(7);
- $div_arg->setDivisor(4);
- $call = self::$client->Div($div_arg);
- $this->assertTrue(is_string($call->getPeer()));
- list($response, $status) = $call->wait();
- $this->assertSame(1, $response->getQuotient());
- $this->assertSame(3, $response->getRemainder());
- $this->assertSame(\Grpc\STATUS_OK, $status->code);
- }
-
- public function testServerStreaming() {
- $fib_arg = new math\FibArgs();
- $fib_arg->setLimit(7);
- $call = self::$client->Fib($fib_arg);
- $this->assertTrue(is_string($call->getPeer()));
- $result_array = iterator_to_array($call->responses());
- $extract_num = function($num){
- return $num->getNum();
- };
- $values = array_map($extract_num, $result_array);
- $this->assertSame([1, 1, 2, 3, 5, 8, 13], $values);
- $status = $call->getStatus();
- $this->assertSame(\Grpc\STATUS_OK, $status->code);
- }
-
- public function testClientStreaming() {
- $call = self::$client->Sum();
- $this->assertTrue(is_string($call->getPeer()));
- for ($i = 0; $i < 7; $i++) {
- $num = new math\Num();
- $num->setNum($i);
- $call->write($num);
+ public function testWaitForNotReady()
+ {
+ $this->assertFalse(self::$client->waitForReady(1));
}
- list($response, $status) = $call->wait();
- $this->assertSame(21, $response->getNum());
- $this->assertSame(\Grpc\STATUS_OK, $status->code);
- }
- public function testBidiStreaming() {
- $call = self::$client->DivMany();
- $this->assertTrue(is_string($call->getPeer()));
- for ($i = 0; $i < 7; $i++) {
- $div_arg = new math\DivArgs();
- $div_arg->setDividend(2 * $i + 1);
- $div_arg->setDivisor(2);
- $call->write($div_arg);
- $response = $call->read();
- $this->assertSame($i, $response->getQuotient());
- $this->assertSame(1, $response->getRemainder());
+ public function testWaitForReady()
+ {
+ $this->assertTrue(self::$client->waitForReady(250000));
}
- $call->writesDone();
- $status = $call->getStatus();
- $this->assertSame(\Grpc\STATUS_OK, $status->code);
- }
+
+ public function testAlreadyReady()
+ {
+ $this->assertTrue(self::$client->waitForReady(250000));
+ $this->assertTrue(self::$client->waitForReady(100));
+ }
+
+ public function testGetTarget()
+ {
+ $this->assertTrue(is_string(self::$client->getTarget()));
+ }
+
+ /**
+ * @expectedException InvalidArgumentException
+ */
+ public function testClose()
+ {
+ self::$client->close();
+ $div_arg = new math\DivArgs();
+ $call = self::$client->Div($div_arg);
+ }
+
+ /**
+ * @expectedException InvalidArgumentException
+ */
+ public function testInvalidMetadata()
+ {
+ $div_arg = new math\DivArgs();
+ $call = self::$client->Div($div_arg, [' ' => 'abc123']);
+ }
+
+ public function testGetCallMetadata()
+ {
+ $div_arg = new math\DivArgs();
+ $call = self::$client->Div($div_arg);
+ $this->assertTrue(is_array($call->getMetadata()));
+ }
+
+ public function testTimeout()
+ {
+ $div_arg = new math\DivArgs();
+ $call = self::$client->Div($div_arg, ['timeout' => 100]);
+ list($response, $status) = $call->wait();
+ $this->assertSame(\Grpc\STATUS_DEADLINE_EXCEEDED, $status->code);
+ }
+
+ public function testCancel()
+ {
+ $div_arg = new math\DivArgs();
+ $call = self::$client->Div($div_arg);
+ $call->cancel();
+ list($response, $status) = $call->wait();
+ $this->assertSame(\Grpc\STATUS_CANCELLED, $status->code);
+ }
+
+ /**
+ * @expectedException InvalidArgumentException
+ */
+ public function testInvalidMethodName()
+ {
+ $invalid_client = new DummyInvalidClient('host', []);
+ $div_arg = new math\DivArgs();
+ $invalid_client->InvalidUnaryCall($div_arg);
+ }
+
+ public function testWriteFlags()
+ {
+ $div_arg = new math\DivArgs();
+ $div_arg->setDividend(7);
+ $div_arg->setDivisor(4);
+ $call = self::$client->Div($div_arg, [],
+ ['flags' => Grpc\WRITE_NO_COMPRESS]);
+ $this->assertTrue(is_string($call->getPeer()));
+ list($response, $status) = $call->wait();
+ $this->assertSame(1, $response->getQuotient());
+ $this->assertSame(3, $response->getRemainder());
+ $this->assertSame(\Grpc\STATUS_OK, $status->code);
+ }
+
+ public function testWriteFlagsServerStreaming()
+ {
+ $fib_arg = new math\FibArgs();
+ $fib_arg->setLimit(7);
+ $call = self::$client->Fib($fib_arg, [],
+ ['flags' => Grpc\WRITE_NO_COMPRESS]);
+ $result_array = iterator_to_array($call->responses());
+ $status = $call->getStatus();
+ $this->assertSame(\Grpc\STATUS_OK, $status->code);
+ }
+
+ public function testWriteFlagsClientStreaming()
+ {
+ $call = self::$client->Sum();
+ $num = new math\Num();
+ $num->setNum(1);
+ $call->write($num, ['flags' => Grpc\WRITE_NO_COMPRESS]);
+ list($response, $status) = $call->wait();
+ $this->assertSame(\Grpc\STATUS_OK, $status->code);
+ }
+
+ public function testWriteFlagsBidiStreaming()
+ {
+ $call = self::$client->DivMany();
+ $div_arg = new math\DivArgs();
+ $div_arg->setDividend(7);
+ $div_arg->setDivisor(4);
+ $call->write($div_arg, ['flags' => Grpc\WRITE_NO_COMPRESS]);
+ $response = $call->read();
+ $call->writesDone();
+ $status = $call->getStatus();
+ $this->assertSame(\Grpc\STATUS_OK, $status->code);
+ }
+
+ public function testSimpleRequest()
+ {
+ $div_arg = new math\DivArgs();
+ $div_arg->setDividend(7);
+ $div_arg->setDivisor(4);
+ $call = self::$client->Div($div_arg);
+ $this->assertTrue(is_string($call->getPeer()));
+ list($response, $status) = $call->wait();
+ $this->assertSame(1, $response->getQuotient());
+ $this->assertSame(3, $response->getRemainder());
+ $this->assertSame(\Grpc\STATUS_OK, $status->code);
+ }
+
+ public function testServerStreaming()
+ {
+ $fib_arg = new math\FibArgs();
+ $fib_arg->setLimit(7);
+ $call = self::$client->Fib($fib_arg);
+ $this->assertTrue(is_string($call->getPeer()));
+ $result_array = iterator_to_array($call->responses());
+ $extract_num = function ($num) {
+ return $num->getNum();
+ };
+ $values = array_map($extract_num, $result_array);
+ $this->assertSame([1, 1, 2, 3, 5, 8, 13], $values);
+ $status = $call->getStatus();
+ $this->assertSame(\Grpc\STATUS_OK, $status->code);
+ }
+
+ public function testClientStreaming()
+ {
+ $call = self::$client->Sum();
+ $this->assertTrue(is_string($call->getPeer()));
+ for ($i = 0; $i < 7; ++$i) {
+ $num = new math\Num();
+ $num->setNum($i);
+ $call->write($num);
+ }
+ list($response, $status) = $call->wait();
+ $this->assertSame(21, $response->getNum());
+ $this->assertSame(\Grpc\STATUS_OK, $status->code);
+ }
+
+ public function testBidiStreaming()
+ {
+ $call = self::$client->DivMany();
+ $this->assertTrue(is_string($call->getPeer()));
+ for ($i = 0; $i < 7; ++$i) {
+ $div_arg = new math\DivArgs();
+ $div_arg->setDividend(2 * $i + 1);
+ $div_arg->setDivisor(2);
+ $call->write($div_arg);
+ $response = $call->read();
+ $this->assertSame($i, $response->getQuotient());
+ $this->assertSame(1, $response->getRemainder());
+ }
+ $call->writesDone();
+ $status = $call->getStatus();
+ $this->assertSame(\Grpc\STATUS_OK, $status->code);
+ }
}
-class DummyInvalidClient extends \Grpc\BaseStub {
- public function InvalidUnaryCall(\math\DivArgs $argument,
- $metadata = array(),
- $options = array()) {
- return $this->_simpleRequest('invalidMethodName', $argument,
- function() {}, $metadata, $options);
- }
+class DummyInvalidClient extends \Grpc\BaseStub
+{
+ public function InvalidUnaryCall(\math\DivArgs $argument,
+ $metadata = [],
+ $options = [])
+ {
+ return $this->_simpleRequest('invalidMethodName',
+ $argument,
+ function () {},
+ $metadata,
+ $options);
+ }
}
diff --git a/src/php/tests/generated_code/GeneratedCodeTest.php b/src/php/tests/generated_code/GeneratedCodeTest.php
index 64bcf45..7043e8e 100755
--- a/src/php/tests/generated_code/GeneratedCodeTest.php
+++ b/src/php/tests/generated_code/GeneratedCodeTest.php
@@ -31,15 +31,18 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-require_once dirname(__FILE__) . '/AbstractGeneratedCodeTest.php';
+require_once dirname(__FILE__).'/AbstractGeneratedCodeTest.php';
-class GeneratedCodeTest extends AbstractGeneratedCodeTest {
- public function setUp() {
- self::$client = new math\MathClient(
+class GeneratedCodeTest extends AbstractGeneratedCodeTest
+{
+ public function setUp()
+ {
+ self::$client = new math\MathClient(
getenv('GRPC_TEST_HOST'), []);
- }
+ }
- public static function tearDownAfterClass() {
- self::$client->close();
- }
+ public static function tearDownAfterClass()
+ {
+ self::$client->close();
+ }
}
diff --git a/src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php b/src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php
index 09c09cf..5a20e68 100644
--- a/src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php
+++ b/src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php
@@ -31,21 +31,25 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-require_once dirname(__FILE__) . '/AbstractGeneratedCodeTest.php';
+require_once dirname(__FILE__).'/AbstractGeneratedCodeTest.php';
-class GeneratedCodeWithCallbackTest extends AbstractGeneratedCodeTest {
- public function setUp() {
- self::$client = new math\MathClient(
- getenv('GRPC_TEST_HOST'), ['update_metadata' =>
- function($a_hash,
- $client = array()) {
- $a_copy = $a_hash;
- $a_copy['foo'] = ['bar'];
- return $a_copy;
- }]);
- }
+class GeneratedCodeWithCallbackTest extends AbstractGeneratedCodeTest
+{
+ public function setUp()
+ {
+ self::$client = new math\MathClient(
+ getenv('GRPC_TEST_HOST'),
+ ['update_metadata' => function ($a_hash,
+ $client = []) {
+ $a_copy = $a_hash;
+ $a_copy['foo'] = ['bar'];
- public static function tearDownAfterClass() {
- self::$client->close();
- }
+ return $a_copy;
+ }]);
+ }
+
+ public static function tearDownAfterClass()
+ {
+ self::$client->close();
+ }
}
diff --git a/src/php/tests/generated_code/math_client.php b/src/php/tests/generated_code/math_client.php
index 7bc7828..76ccabc 100644
--- a/src/php/tests/generated_code/math_client.php
+++ b/src/php/tests/generated_code/math_client.php
@@ -36,31 +36,32 @@
include 'vendor/autoload.php';
include 'tests/generated_code/math.php';
-function p($line) {
- print("$line<br/>\n");
+function p($line)
+{
+ print("$line<br/>\n");
}
-$host = "localhost:50051";
+$host = 'localhost:50051';
p("Connecting to host: $host");
$client = new math\MathClient($host, []);
-p("Client class: ".get_class($client));
+p('Client class: '.get_class($client));
p('');
-p("Running unary call test:");
+p('Running unary call test:');
$dividend = 7;
$divisor = 4;
$div_arg = new math\DivArgs();
$div_arg->setDividend($dividend);
$div_arg->setDivisor($divisor);
$call = $client->Div($div_arg);
-p("Call peer: ".$call->getPeer());
+p('Call peer: '.$call->getPeer());
p("Dividing $dividend by $divisor");
list($response, $status) = $call->wait();
-p("quotient = ".$response->getQuotient());
-p("remainder = ".$response->getRemainder());
+p('quotient = '.$response->getQuotient());
+p('remainder = '.$response->getRemainder());
p('');
-p("Running server streaming test:");
+p('Running server streaming test:');
$limit = 7;
$fib_arg = new math\FibArgs();
$fib_arg->setLimit($limit);
@@ -68,35 +69,35 @@
$result_array = iterator_to_array($call->responses());
$result = '';
foreach ($result_array as $num) {
- $result .= ' '.$num->getNum();
+ $result .= ' '.$num->getNum();
}
p("The first $limit Fibonacci numbers are:".$result);
p('');
-p("Running client streaming test:");
+p('Running client streaming test:');
$call = $client->Sum();
-for ($i = 0; $i <= $limit; $i++) {
- $num = new math\Num();
- $num->setNum($i);
- $call->write($num);
+for ($i = 0; $i <= $limit; ++$i) {
+ $num = new math\Num();
+ $num->setNum($i);
+ $call->write($num);
}
list($response, $status) = $call->wait();
-p(sprintf("The first %d positive integers sum to: %d",
+p(sprintf('The first %d positive integers sum to: %d',
$limit, $response->getNum()));
p('');
-p("Running bidi-streaming test:");
+p('Running bidi-streaming test:');
$call = $client->DivMany();
-for ($i = 0; $i < 7; $i++) {
- $div_arg = new math\DivArgs();
- $dividend = 2 * $i + 1;
- $divisor = 3;
- $div_arg->setDividend($dividend);
- $div_arg->setDivisor($divisor);
- $call->write($div_arg);
- p("client writing: $dividend / $divisor");
- $response = $call->read();
- p(sprintf("server writing: quotient = %d, remainder = %d",
+for ($i = 0; $i < 7; ++$i) {
+ $div_arg = new math\DivArgs();
+ $dividend = 2 * $i + 1;
+ $divisor = 3;
+ $div_arg->setDividend($dividend);
+ $div_arg->setDivisor($divisor);
+ $call->write($div_arg);
+ p("client writing: $dividend / $divisor");
+ $response = $call->read();
+ p(sprintf('server writing: quotient = %d, remainder = %d',
$response->getQuotient(), $response->getRemainder()));
}
$call->writesDone();
diff --git a/src/php/tests/interop/interop_client.php b/src/php/tests/interop/interop_client.php
index 5965097..3019866 100755
--- a/src/php/tests/interop/interop_client.php
+++ b/src/php/tests/interop/interop_client.php
@@ -31,7 +31,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-require_once realpath(dirname(__FILE__) . '/../../vendor/autoload.php');
+require_once realpath(dirname(__FILE__).'/../../vendor/autoload.php');
require 'empty.php';
require 'messages.php';
require 'test.php';
@@ -41,395 +41,427 @@
/**
* Assertion function that always exits with an error code if the assertion is
- * falsy
+ * falsy.
+ *
* @param $value Assertion value. Should be true.
* @param $error_message Message to display if the assertion is false
*/
-function hardAssert($value, $error_message) {
- if (!$value) {
- echo $error_message . "\n";
- exit(1);
- }
+function hardAssert($value, $error_message)
+{
+ if (!$value) {
+ echo $error_message."\n";
+ exit(1);
+ }
}
/**
* Run the empty_unary test.
+ *
* @param $stub Stub object that has service methods
*/
-function emptyUnary($stub) {
- list($result, $status) = $stub->EmptyCall(new grpc\testing\EmptyMessage())->wait();
- hardAssert($status->code === Grpc\STATUS_OK, 'Call did not complete successfully');
- hardAssert($result !== null, 'Call completed with a null response');
+function emptyUnary($stub)
+{
+ list($result, $status) = $stub->EmptyCall(new grpc\testing\EmptyMessage())->wait();
+ hardAssert($status->code === Grpc\STATUS_OK, 'Call did not complete successfully');
+ hardAssert($result !== null, 'Call completed with a null response');
}
/**
* Run the large_unary test.
+ *
* @param $stub Stub object that has service methods
*/
-function largeUnary($stub) {
- performLargeUnary($stub);
+function largeUnary($stub)
+{
+ performLargeUnary($stub);
}
/**
- * Shared code between large unary test and auth test
+ * Shared code between large unary test and auth test.
+ *
* @param $stub Stub object that has service methods
* @param $fillUsername boolean whether to fill result with username
* @param $fillOauthScope boolean whether to fill result with oauth scope
*/
function performLargeUnary($stub, $fillUsername = false, $fillOauthScope = false,
- $metadata = array()) {
- $request_len = 271828;
- $response_len = 314159;
+ $metadata = [])
+{
+ $request_len = 271828;
+ $response_len = 314159;
- $request = new grpc\testing\SimpleRequest();
- $request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE);
- $request->setResponseSize($response_len);
- $payload = new grpc\testing\Payload();
- $payload->setType(grpc\testing\PayloadType::COMPRESSABLE);
- $payload->setBody(str_repeat("\0", $request_len));
- $request->setPayload($payload);
- $request->setFillUsername($fillUsername);
- $request->setFillOauthScope($fillOauthScope);
+ $request = new grpc\testing\SimpleRequest();
+ $request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE);
+ $request->setResponseSize($response_len);
+ $payload = new grpc\testing\Payload();
+ $payload->setType(grpc\testing\PayloadType::COMPRESSABLE);
+ $payload->setBody(str_repeat("\0", $request_len));
+ $request->setPayload($payload);
+ $request->setFillUsername($fillUsername);
+ $request->setFillOauthScope($fillOauthScope);
- list($result, $status) = $stub->UnaryCall($request, $metadata)->wait();
- hardAssert($status->code === Grpc\STATUS_OK, 'Call did not complete successfully');
- hardAssert($result !== null, 'Call returned a null response');
- $payload = $result->getPayload();
- hardAssert($payload->getType() === grpc\testing\PayloadType::COMPRESSABLE,
+ list($result, $status) = $stub->UnaryCall($request, $metadata)->wait();
+ hardAssert($status->code === Grpc\STATUS_OK, 'Call did not complete successfully');
+ hardAssert($result !== null, 'Call returned a null response');
+ $payload = $result->getPayload();
+ hardAssert($payload->getType() === grpc\testing\PayloadType::COMPRESSABLE,
'Payload had the wrong type');
- hardAssert(strlen($payload->getBody()) === $response_len,
+ hardAssert(strlen($payload->getBody()) === $response_len,
'Payload had the wrong length');
- hardAssert($payload->getBody() === str_repeat("\0", $response_len),
+ hardAssert($payload->getBody() === str_repeat("\0", $response_len),
'Payload had the wrong content');
- return $result;
+
+ return $result;
}
/**
* Run the service account credentials auth test.
+ *
* @param $stub Stub object that has service methods
* @param $args array command line args
*/
-function serviceAccountCreds($stub, $args) {
- if (!array_key_exists('oauth_scope', $args)) {
- throw new Exception('Missing oauth scope');
- }
- $jsonKey = json_decode(
- file_get_contents(getenv(CredentialsLoader::ENV_VAR)),
- true);
- $result = performLargeUnary($stub, $fillUsername=true, $fillOauthScope=true);
- hardAssert($result->getUsername() == $jsonKey['client_email'],
+function serviceAccountCreds($stub, $args)
+{
+ if (!array_key_exists('oauth_scope', $args)) {
+ throw new Exception('Missing oauth scope');
+ }
+ $jsonKey = json_decode(
+ file_get_contents(getenv(CredentialsLoader::ENV_VAR)),
+ true);
+ $result = performLargeUnary($stub, $fillUsername = true, $fillOauthScope = true);
+ hardAssert($result->getUsername() == $jsonKey['client_email'],
'invalid email returned');
- hardAssert(strpos($args['oauth_scope'], $result->getOauthScope()) !== false,
+ hardAssert(strpos($args['oauth_scope'], $result->getOauthScope()) !== false,
'invalid oauth scope returned');
}
/**
* Run the compute engine credentials auth test.
- * Has not been run from gcloud as of 2015-05-05
+ * Has not been run from gcloud as of 2015-05-05.
+ *
* @param $stub Stub object that has service methods
* @param $args array command line args
*/
-function computeEngineCreds($stub, $args) {
- if (!array_key_exists('oauth_scope', $args)) {
- throw new Exception('Missing oauth scope');
- }
- if (!array_key_exists('default_service_account', $args)) {
- throw new Exception('Missing default_service_account');
- }
- $result = performLargeUnary($stub, $fillUsername=true, $fillOauthScope=true);
- hardAssert($args['default_service_account'] == $result->getUsername(),
+function computeEngineCreds($stub, $args)
+{
+ if (!array_key_exists('oauth_scope', $args)) {
+ throw new Exception('Missing oauth scope');
+ }
+ if (!array_key_exists('default_service_account', $args)) {
+ throw new Exception('Missing default_service_account');
+ }
+ $result = performLargeUnary($stub, $fillUsername = true, $fillOauthScope = true);
+ hardAssert($args['default_service_account'] == $result->getUsername(),
'invalid email returned');
}
/**
* Run the jwt token credentials auth test.
+ *
* @param $stub Stub object that has service methods
* @param $args array command line args
*/
-function jwtTokenCreds($stub, $args) {
- $jsonKey = json_decode(
- file_get_contents(getenv(CredentialsLoader::ENV_VAR)),
- true);
- $result = performLargeUnary($stub, $fillUsername=true, $fillOauthScope=true);
- hardAssert($result->getUsername() == $jsonKey['client_email'],
+function jwtTokenCreds($stub, $args)
+{
+ $jsonKey = json_decode(
+ file_get_contents(getenv(CredentialsLoader::ENV_VAR)),
+ true);
+ $result = performLargeUnary($stub, $fillUsername = true, $fillOauthScope = true);
+ hardAssert($result->getUsername() == $jsonKey['client_email'],
'invalid email returned');
}
/**
* Run the oauth2_auth_token auth test.
+ *
* @param $stub Stub object that has service methods
* @param $args array command line args
*/
-function oauth2AuthToken($stub, $args) {
- $jsonKey = json_decode(
- file_get_contents(getenv(CredentialsLoader::ENV_VAR)),
- true);
- $result = performLargeUnary($stub, $fillUsername=true, $fillOauthScope=true);
- hardAssert($result->getUsername() == $jsonKey['client_email'],
+function oauth2AuthToken($stub, $args)
+{
+ $jsonKey = json_decode(
+ file_get_contents(getenv(CredentialsLoader::ENV_VAR)),
+ true);
+ $result = performLargeUnary($stub, $fillUsername = true, $fillOauthScope = true);
+ hardAssert($result->getUsername() == $jsonKey['client_email'],
'invalid email returned');
}
/**
* Run the per_rpc_creds auth test.
+ *
* @param $stub Stub object that has service methods
* @param $args array command line args
*/
-function perRpcCreds($stub, $args) {
- $jsonKey = json_decode(
- file_get_contents(getenv(CredentialsLoader::ENV_VAR)),
- true);
- $auth_credentials = ApplicationDefaultCredentials::getCredentials(
- $args['oauth_scope']
- );
- $token = $auth_credentials->fetchAuthToken();
- $metadata = array(CredentialsLoader::AUTH_METADATA_KEY =>
- array(sprintf("%s %s",
- $token['token_type'],
- $token['access_token'])));
- $result = performLargeUnary($stub, $fillUsername=true, $fillOauthScope=true,
+function perRpcCreds($stub, $args)
+{
+ $jsonKey = json_decode(
+ file_get_contents(getenv(CredentialsLoader::ENV_VAR)),
+ true);
+ $auth_credentials = ApplicationDefaultCredentials::getCredentials(
+ $args['oauth_scope']
+ );
+ $token = $auth_credentials->fetchAuthToken();
+ $metadata = [CredentialsLoader::AUTH_METADATA_KEY => [sprintf('%s %s',
+ $token['token_type'],
+ $token['access_token'])]];
+ $result = performLargeUnary($stub, $fillUsername = true, $fillOauthScope = true,
$metadata);
- hardAssert($result->getUsername() == $jsonKey['client_email'],
+ hardAssert($result->getUsername() == $jsonKey['client_email'],
'invalid email returned');
}
/**
* Run the client_streaming test.
+ *
* @param $stub Stub object that has service methods
*/
-function clientStreaming($stub) {
- $request_lengths = array(27182, 8, 1828, 45904);
+function clientStreaming($stub)
+{
+ $request_lengths = [27182, 8, 1828, 45904];
- $requests = array_map(
- function($length) {
- $request = new grpc\testing\StreamingInputCallRequest();
- $payload = new grpc\testing\Payload();
- $payload->setBody(str_repeat("\0", $length));
- $request->setPayload($payload);
- return $request;
- }, $request_lengths);
+ $requests = array_map(
+ function ($length) {
+ $request = new grpc\testing\StreamingInputCallRequest();
+ $payload = new grpc\testing\Payload();
+ $payload->setBody(str_repeat("\0", $length));
+ $request->setPayload($payload);
- $call = $stub->StreamingInputCall();
- foreach ($requests as $request) {
- $call->write($request);
- }
- list($result, $status) = $call->wait();
- hardAssert($status->code === Grpc\STATUS_OK, 'Call did not complete successfully');
- hardAssert($result->getAggregatedPayloadSize() === 74922,
+ return $request;
+ }, $request_lengths);
+
+ $call = $stub->StreamingInputCall();
+ foreach ($requests as $request) {
+ $call->write($request);
+ }
+ list($result, $status) = $call->wait();
+ hardAssert($status->code === Grpc\STATUS_OK, 'Call did not complete successfully');
+ hardAssert($result->getAggregatedPayloadSize() === 74922,
'aggregated_payload_size was incorrect');
}
/**
* Run the server_streaming test.
+ *
* @param $stub Stub object that has service methods.
*/
-function serverStreaming($stub) {
- $sizes = array(31415, 9, 2653, 58979);
+function serverStreaming($stub)
+{
+ $sizes = [31415, 9, 2653, 58979];
- $request = new grpc\testing\StreamingOutputCallRequest();
- $request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE);
- foreach($sizes as $size) {
- $response_parameters = new grpc\testing\ResponseParameters();
- $response_parameters->setSize($size);
- $request->addResponseParameters($response_parameters);
- }
+ $request = new grpc\testing\StreamingOutputCallRequest();
+ $request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE);
+ foreach ($sizes as $size) {
+ $response_parameters = new grpc\testing\ResponseParameters();
+ $response_parameters->setSize($size);
+ $request->addResponseParameters($response_parameters);
+ }
- $call = $stub->StreamingOutputCall($request);
- $i = 0;
- foreach($call->responses() as $value) {
- hardAssert($i < 4, 'Too many responses');
- $payload = $value->getPayload();
- hardAssert($payload->getType() === grpc\testing\PayloadType::COMPRESSABLE,
- 'Payload ' . $i . ' had the wrong type');
- hardAssert(strlen($payload->getBody()) === $sizes[$i],
- 'Response ' . $i . ' had the wrong length');
- $i += 1;
- }
- hardAssert($call->getStatus()->code === Grpc\STATUS_OK,
+ $call = $stub->StreamingOutputCall($request);
+ $i = 0;
+ foreach ($call->responses() as $value) {
+ hardAssert($i < 4, 'Too many responses');
+ $payload = $value->getPayload();
+ hardAssert($payload->getType() === grpc\testing\PayloadType::COMPRESSABLE,
+ 'Payload '.$i.' had the wrong type');
+ hardAssert(strlen($payload->getBody()) === $sizes[$i],
+ 'Response '.$i.' had the wrong length');
+ $i += 1;
+ }
+ hardAssert($call->getStatus()->code === Grpc\STATUS_OK,
'Call did not complete successfully');
}
/**
* Run the ping_pong test.
+ *
* @param $stub Stub object that has service methods.
*/
-function pingPong($stub) {
- $request_lengths = array(27182, 8, 1828, 45904);
- $response_lengths = array(31415, 9, 2653, 58979);
+function pingPong($stub)
+{
+ $request_lengths = [27182, 8, 1828, 45904];
+ $response_lengths = [31415, 9, 2653, 58979];
- $call = $stub->FullDuplexCall();
- for($i = 0; $i < 4; $i++) {
- $request = new grpc\testing\StreamingOutputCallRequest();
- $request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE);
- $response_parameters = new grpc\testing\ResponseParameters();
- $response_parameters->setSize($response_lengths[$i]);
- $request->addResponseParameters($response_parameters);
- $payload = new grpc\testing\Payload();
- $payload->setBody(str_repeat("\0", $request_lengths[$i]));
- $request->setPayload($payload);
+ $call = $stub->FullDuplexCall();
+ for ($i = 0; $i < 4; ++$i) {
+ $request = new grpc\testing\StreamingOutputCallRequest();
+ $request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE);
+ $response_parameters = new grpc\testing\ResponseParameters();
+ $response_parameters->setSize($response_lengths[$i]);
+ $request->addResponseParameters($response_parameters);
+ $payload = new grpc\testing\Payload();
+ $payload->setBody(str_repeat("\0", $request_lengths[$i]));
+ $request->setPayload($payload);
- $call->write($request);
- $response = $call->read();
+ $call->write($request);
+ $response = $call->read();
- hardAssert($response !== null, 'Server returned too few responses');
- $payload = $response->getPayload();
- hardAssert($payload->getType() === grpc\testing\PayloadType::COMPRESSABLE,
- 'Payload ' . $i . ' had the wrong type');
- hardAssert(strlen($payload->getBody()) === $response_lengths[$i],
- 'Payload ' . $i . ' had the wrong length');
- }
- $call->writesDone();
- hardAssert($call->read() === null, 'Server returned too many responses');
- hardAssert($call->getStatus()->code === Grpc\STATUS_OK,
+ hardAssert($response !== null, 'Server returned too few responses');
+ $payload = $response->getPayload();
+ hardAssert($payload->getType() === grpc\testing\PayloadType::COMPRESSABLE,
+ 'Payload '.$i.' had the wrong type');
+ hardAssert(strlen($payload->getBody()) === $response_lengths[$i],
+ 'Payload '.$i.' had the wrong length');
+ }
+ $call->writesDone();
+ hardAssert($call->read() === null, 'Server returned too many responses');
+ hardAssert($call->getStatus()->code === Grpc\STATUS_OK,
'Call did not complete successfully');
}
/**
* Run the empty_stream test.
+ *
* @param $stub Stub object that has service methods.
*/
-function emptyStream($stub) {
- $call = $stub->FullDuplexCall();
- $call->writesDone();
- hardAssert($call->read() === null, 'Server returned too many responses');
- hardAssert($call->getStatus()->code === Grpc\STATUS_OK,
+function emptyStream($stub)
+{
+ $call = $stub->FullDuplexCall();
+ $call->writesDone();
+ hardAssert($call->read() === null, 'Server returned too many responses');
+ hardAssert($call->getStatus()->code === Grpc\STATUS_OK,
'Call did not complete successfully');
}
/**
* Run the cancel_after_begin test.
+ *
* @param $stub Stub object that has service methods.
*/
-function cancelAfterBegin($stub) {
- $call = $stub->StreamingInputCall();
- $call->cancel();
- list($result, $status) = $call->wait();
- hardAssert($status->code === Grpc\STATUS_CANCELLED,
+function cancelAfterBegin($stub)
+{
+ $call = $stub->StreamingInputCall();
+ $call->cancel();
+ list($result, $status) = $call->wait();
+ hardAssert($status->code === Grpc\STATUS_CANCELLED,
'Call status was not CANCELLED');
}
/**
* Run the cancel_after_first_response test.
+ *
* @param $stub Stub object that has service methods.
*/
-function cancelAfterFirstResponse($stub) {
- $call = $stub->FullDuplexCall();
- $request = new grpc\testing\StreamingOutputCallRequest();
- $request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE);
- $response_parameters = new grpc\testing\ResponseParameters();
- $response_parameters->setSize(31415);
- $request->addResponseParameters($response_parameters);
- $payload = new grpc\testing\Payload();
- $payload->setBody(str_repeat("\0", 27182));
- $request->setPayload($payload);
+function cancelAfterFirstResponse($stub)
+{
+ $call = $stub->FullDuplexCall();
+ $request = new grpc\testing\StreamingOutputCallRequest();
+ $request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE);
+ $response_parameters = new grpc\testing\ResponseParameters();
+ $response_parameters->setSize(31415);
+ $request->addResponseParameters($response_parameters);
+ $payload = new grpc\testing\Payload();
+ $payload->setBody(str_repeat("\0", 27182));
+ $request->setPayload($payload);
- $call->write($request);
- $response = $call->read();
+ $call->write($request);
+ $response = $call->read();
- $call->cancel();
- hardAssert($call->getStatus()->code === Grpc\STATUS_CANCELLED,
+ $call->cancel();
+ hardAssert($call->getStatus()->code === Grpc\STATUS_CANCELLED,
'Call status was not CANCELLED');
}
-function timeoutOnSleepingServer($stub) {
- $call = $stub->FullDuplexCall(array('timeout' => 1000));
- $request = new grpc\testing\StreamingOutputCallRequest();
- $request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE);
- $response_parameters = new grpc\testing\ResponseParameters();
- $response_parameters->setSize(8);
- $request->addResponseParameters($response_parameters);
- $payload = new grpc\testing\Payload();
- $payload->setBody(str_repeat("\0", 9));
- $request->setPayload($payload);
+function timeoutOnSleepingServer($stub)
+{
+ $call = $stub->FullDuplexCall(['timeout' => 1000]);
+ $request = new grpc\testing\StreamingOutputCallRequest();
+ $request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE);
+ $response_parameters = new grpc\testing\ResponseParameters();
+ $response_parameters->setSize(8);
+ $request->addResponseParameters($response_parameters);
+ $payload = new grpc\testing\Payload();
+ $payload->setBody(str_repeat("\0", 9));
+ $request->setPayload($payload);
- $call->write($request);
- $response = $call->read();
+ $call->write($request);
+ $response = $call->read();
- hardAssert($call->getStatus()->code === Grpc\STATUS_DEADLINE_EXCEEDED,
+ hardAssert($call->getStatus()->code === Grpc\STATUS_DEADLINE_EXCEEDED,
'Call status was not DEADLINE_EXCEEDED');
}
-$args = getopt('', array('server_host:', 'server_port:', 'test_case:',
- 'use_tls::', 'use_test_ca::',
- 'server_host_override:', 'oauth_scope:',
- 'default_service_account:'));
+$args = getopt('', ['server_host:', 'server_port:', 'test_case:',
+ 'use_tls::', 'use_test_ca::',
+ 'server_host_override:', 'oauth_scope:',
+ 'default_service_account:', ]);
if (!array_key_exists('server_host', $args)) {
- throw new Exception('Missing argument: --server_host is required');
+ throw new Exception('Missing argument: --server_host is required');
}
if (!array_key_exists('server_port', $args)) {
- throw new Exception('Missing argument: --server_port is required');
+ throw new Exception('Missing argument: --server_port is required');
}
if (!array_key_exists('test_case', $args)) {
- throw new Exception('Missing argument: --test_case is required');
+ throw new Exception('Missing argument: --test_case is required');
}
if ($args['server_port'] == 443) {
- $server_address = $args['server_host'];
+ $server_address = $args['server_host'];
} else {
- $server_address = $args['server_host'] . ':' . $args['server_port'];
+ $server_address = $args['server_host'].':'.$args['server_port'];
}
$test_case = $args['test_case'];
$host_override = 'foo.test.google.fr';
if (array_key_exists('server_host_override', $args)) {
- $host_override = $args['server_host_override'];
+ $host_override = $args['server_host_override'];
}
$use_tls = false;
if (array_key_exists('use_tls', $args) &&
$args['use_tls'] != 'false') {
- $use_tls = true;
+ $use_tls = true;
}
$use_test_ca = false;
if (array_key_exists('use_test_ca', $args) &&
$args['use_test_ca'] != 'false') {
- $use_test_ca = true;
+ $use_test_ca = true;
}
$opts = [];
if ($use_tls) {
- if ($use_test_ca) {
- $ssl_cert_file = dirname(__FILE__) . '/../data/ca.pem';
- } else {
- $ssl_cert_file = getenv('SSL_CERT_FILE');
- }
- $ssl_credentials = Grpc\Credentials::createSsl(
- file_get_contents($ssl_cert_file));
- $opts['credentials'] = $ssl_credentials;
- $opts['grpc.ssl_target_name_override'] = $host_override;
+ if ($use_test_ca) {
+ $ssl_credentials = Grpc\Credentials::createSsl(
+ file_get_contents(dirname(__FILE__).'/../data/ca.pem'));
+ } else {
+ $ssl_credentials = Grpc\Credentials::createSsl();
+ }
+ $opts['credentials'] = $ssl_credentials;
+ $opts['grpc.ssl_target_name_override'] = $host_override;
}
-if (in_array($test_case, array('service_account_creds',
- 'compute_engine_creds', 'jwt_token_creds'))) {
- if ($test_case == 'jwt_token_creds') {
- $auth_credentials = ApplicationDefaultCredentials::getCredentials();
- } else {
- $auth_credentials = ApplicationDefaultCredentials::getCredentials(
- $args['oauth_scope']
- );
- }
- $opts['update_metadata'] = $auth_credentials->getUpdateMetadataFunc();
+if (in_array($test_case, ['service_account_creds',
+ 'compute_engine_creds', 'jwt_token_creds', ])) {
+ if ($test_case == 'jwt_token_creds') {
+ $auth_credentials = ApplicationDefaultCredentials::getCredentials();
+ } else {
+ $auth_credentials = ApplicationDefaultCredentials::getCredentials(
+ $args['oauth_scope']
+ );
+ }
+ $opts['update_metadata'] = $auth_credentials->getUpdateMetadataFunc();
}
if ($test_case == 'oauth2_auth_token') {
- $auth_credentials = ApplicationDefaultCredentials::getCredentials(
- $args['oauth_scope']
- );
- $token = $auth_credentials->fetchAuthToken();
- $update_metadata =
- function($metadata,
- $authUri = null,
- ClientInterface $client = null) use ($token) {
- $metadata_copy = $metadata;
- $metadata_copy[CredentialsLoader::AUTH_METADATA_KEY] =
- array(sprintf("%s %s",
- $token['token_type'],
- $token['access_token']));
- return $metadata_copy;
- };
- $opts['update_metadata'] = $update_metadata;
+ $auth_credentials = ApplicationDefaultCredentials::getCredentials(
+ $args['oauth_scope']
+ );
+ $token = $auth_credentials->fetchAuthToken();
+ $update_metadata =
+ function ($metadata,
+ $authUri = null,
+ ClientInterface $client = null) use ($token) {
+ $metadata_copy = $metadata;
+ $metadata_copy[CredentialsLoader::AUTH_METADATA_KEY] =
+ [sprintf('%s %s',
+ $token['token_type'],
+ $token['access_token'])];
+
+ return $metadata_copy;
+ };
+ $opts['update_metadata'] = $update_metadata;
}
$stub = new grpc\testing\TestServiceClient($server_address, $opts);
@@ -438,49 +470,49 @@
echo "Running test case $test_case\n";
switch ($test_case) {
- case 'empty_unary':
- emptyUnary($stub);
- break;
- case 'large_unary':
- largeUnary($stub);
- break;
- case 'client_streaming':
- clientStreaming($stub);
- break;
- case 'server_streaming':
- serverStreaming($stub);
- break;
- case 'ping_pong':
- pingPong($stub);
- break;
- case 'empty_stream':
- emptyStream($stub);
- break;
- case 'cancel_after_begin':
- cancelAfterBegin($stub);
- break;
- case 'cancel_after_first_response':
- cancelAfterFirstResponse($stub);
- break;
- case 'timeout_on_sleeping_server':
- timeoutOnSleepingServer($stub);
- break;
- case 'service_account_creds':
- serviceAccountCreds($stub, $args);
- break;
- case 'compute_engine_creds':
- computeEngineCreds($stub, $args);
- break;
- case 'jwt_token_creds':
- jwtTokenCreds($stub, $args);
- break;
- case 'oauth2_auth_token':
- oauth2AuthToken($stub, $args);
- break;
- case 'per_rpc_creds':
- perRpcCreds($stub, $args);
- break;
- default:
- echo "Unsupported test case $test_case\n";
- exit(1);
+ case 'empty_unary':
+ emptyUnary($stub);
+ break;
+ case 'large_unary':
+ largeUnary($stub);
+ break;
+ case 'client_streaming':
+ clientStreaming($stub);
+ break;
+ case 'server_streaming':
+ serverStreaming($stub);
+ break;
+ case 'ping_pong':
+ pingPong($stub);
+ break;
+ case 'empty_stream':
+ emptyStream($stub);
+ break;
+ case 'cancel_after_begin':
+ cancelAfterBegin($stub);
+ break;
+ case 'cancel_after_first_response':
+ cancelAfterFirstResponse($stub);
+ break;
+ case 'timeout_on_sleeping_server':
+ timeoutOnSleepingServer($stub);
+ break;
+ case 'service_account_creds':
+ serviceAccountCreds($stub, $args);
+ break;
+ case 'compute_engine_creds':
+ computeEngineCreds($stub, $args);
+ break;
+ case 'jwt_token_creds':
+ jwtTokenCreds($stub, $args);
+ break;
+ case 'oauth2_auth_token':
+ oauth2AuthToken($stub, $args);
+ break;
+ case 'per_rpc_creds':
+ perRpcCreds($stub, $args);
+ break;
+ default:
+ echo "Unsupported test case $test_case\n";
+ exit(1);
}
diff --git a/src/php/tests/unit_tests/CallTest.php b/src/php/tests/unit_tests/CallTest.php
index caff15e..3b697b5 100755
--- a/src/php/tests/unit_tests/CallTest.php
+++ b/src/php/tests/unit_tests/CallTest.php
@@ -31,56 +31,64 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-class CallTest extends PHPUnit_Framework_TestCase{
- static $server;
- static $port;
+class CallTest extends PHPUnit_Framework_TestCase
+{
+ public static $server;
+ public static $port;
- public static function setUpBeforeClass() {
- self::$server = new Grpc\Server([]);
- self::$port = self::$server->addHttp2Port('0.0.0.0:0');
- }
+ public static function setUpBeforeClass()
+ {
+ self::$server = new Grpc\Server([]);
+ self::$port = self::$server->addHttp2Port('0.0.0.0:0');
+ }
- public function setUp() {
- $this->channel = new Grpc\Channel('localhost:' . self::$port, []);
- $this->call = new Grpc\Call($this->channel,
- '/foo',
- Grpc\Timeval::infFuture());
- }
+ public function setUp()
+ {
+ $this->channel = new Grpc\Channel('localhost:'.self::$port, []);
+ $this->call = new Grpc\Call($this->channel,
+ '/foo',
+ Grpc\Timeval::infFuture());
+ }
- public function testAddEmptyMetadata() {
- $batch = [
- Grpc\OP_SEND_INITIAL_METADATA => []
- ];
- $result = $this->call->startBatch($batch);
- $this->assertTrue($result->send_metadata);
- }
+ public function testAddEmptyMetadata()
+ {
+ $batch = [
+ Grpc\OP_SEND_INITIAL_METADATA => [],
+ ];
+ $result = $this->call->startBatch($batch);
+ $this->assertTrue($result->send_metadata);
+ }
- public function testAddSingleMetadata() {
- $batch = [
- Grpc\OP_SEND_INITIAL_METADATA => ['key' => ['value']]
- ];
- $result = $this->call->startBatch($batch);
- $this->assertTrue($result->send_metadata);
- }
+ public function testAddSingleMetadata()
+ {
+ $batch = [
+ Grpc\OP_SEND_INITIAL_METADATA => ['key' => ['value']],
+ ];
+ $result = $this->call->startBatch($batch);
+ $this->assertTrue($result->send_metadata);
+ }
- public function testAddMultiValueMetadata() {
- $batch = [
- Grpc\OP_SEND_INITIAL_METADATA => ['key' => ['value1', 'value2']]
- ];
- $result = $this->call->startBatch($batch);
- $this->assertTrue($result->send_metadata);
- }
+ public function testAddMultiValueMetadata()
+ {
+ $batch = [
+ Grpc\OP_SEND_INITIAL_METADATA => ['key' => ['value1', 'value2']],
+ ];
+ $result = $this->call->startBatch($batch);
+ $this->assertTrue($result->send_metadata);
+ }
- public function testAddSingleAndMultiValueMetadata() {
- $batch = [
- Grpc\OP_SEND_INITIAL_METADATA => ['key1' => ['value1'],
- 'key2' => ['value2', 'value3']]
- ];
- $result = $this->call->startBatch($batch);
- $this->assertTrue($result->send_metadata);
- }
+ public function testAddSingleAndMultiValueMetadata()
+ {
+ $batch = [
+ Grpc\OP_SEND_INITIAL_METADATA => ['key1' => ['value1'],
+ 'key2' => ['value2', 'value3'], ],
+ ];
+ $result = $this->call->startBatch($batch);
+ $this->assertTrue($result->send_metadata);
+ }
- public function testGetPeer() {
- $this->assertTrue(is_string($this->call->getPeer()));
- }
+ public function testGetPeer()
+ {
+ $this->assertTrue(is_string($this->call->getPeer()));
+ }
}
diff --git a/src/php/tests/unit_tests/EndToEndTest.php b/src/php/tests/unit_tests/EndToEndTest.php
index b653662..5a38262 100755
--- a/src/php/tests/unit_tests/EndToEndTest.php
+++ b/src/php/tests/unit_tests/EndToEndTest.php
@@ -31,217 +31,228 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-class EndToEndTest extends PHPUnit_Framework_TestCase{
- public function setUp() {
- $this->server = new Grpc\Server([]);
- $this->port = $this->server->addHttp2Port('0.0.0.0:0');
- $this->channel = new Grpc\Channel('localhost:' . $this->port, []);
- $this->server->start();
- }
+class EndToEndTest extends PHPUnit_Framework_TestCase
+{
+ public function setUp()
+ {
+ $this->server = new Grpc\Server([]);
+ $this->port = $this->server->addHttp2Port('0.0.0.0:0');
+ $this->channel = new Grpc\Channel('localhost:'.$this->port, []);
+ $this->server->start();
+ }
- public function tearDown() {
- unset($this->channel);
- unset($this->server);
- }
+ public function tearDown()
+ {
+ unset($this->channel);
+ unset($this->server);
+ }
- public function testSimpleRequestBody() {
- $deadline = Grpc\Timeval::infFuture();
- $status_text = 'xyz';
- $call = new Grpc\Call($this->channel,
- 'dummy_method',
- $deadline);
+ public function testSimpleRequestBody()
+ {
+ $deadline = Grpc\Timeval::infFuture();
+ $status_text = 'xyz';
+ $call = new Grpc\Call($this->channel,
+ 'dummy_method',
+ $deadline);
- $event = $call->startBatch([
- Grpc\OP_SEND_INITIAL_METADATA => [],
- Grpc\OP_SEND_CLOSE_FROM_CLIENT => true
- ]);
+ $event = $call->startBatch([
+ Grpc\OP_SEND_INITIAL_METADATA => [],
+ Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
+ ]);
- $this->assertTrue($event->send_metadata);
- $this->assertTrue($event->send_close);
+ $this->assertTrue($event->send_metadata);
+ $this->assertTrue($event->send_close);
- $event = $this->server->requestCall();
- $this->assertSame('dummy_method', $event->method);
- $server_call = $event->call;
+ $event = $this->server->requestCall();
+ $this->assertSame('dummy_method', $event->method);
+ $server_call = $event->call;
- $event = $server_call->startBatch([
- Grpc\OP_SEND_INITIAL_METADATA => [],
- Grpc\OP_SEND_STATUS_FROM_SERVER => [
- 'metadata' => [],
- 'code' => Grpc\STATUS_OK,
- 'details' => $status_text
- ],
- Grpc\OP_RECV_CLOSE_ON_SERVER => true
- ]);
+ $event = $server_call->startBatch([
+ Grpc\OP_SEND_INITIAL_METADATA => [],
+ Grpc\OP_SEND_STATUS_FROM_SERVER => [
+ 'metadata' => [],
+ 'code' => Grpc\STATUS_OK,
+ 'details' => $status_text,
+ ],
+ Grpc\OP_RECV_CLOSE_ON_SERVER => true,
+ ]);
- $this->assertTrue($event->send_metadata);
- $this->assertTrue($event->send_status);
- $this->assertFalse($event->cancelled);
+ $this->assertTrue($event->send_metadata);
+ $this->assertTrue($event->send_status);
+ $this->assertFalse($event->cancelled);
- $event = $call->startBatch([
- Grpc\OP_RECV_INITIAL_METADATA => true,
- Grpc\OP_RECV_STATUS_ON_CLIENT => true
- ]);
+ $event = $call->startBatch([
+ Grpc\OP_RECV_INITIAL_METADATA => true,
+ Grpc\OP_RECV_STATUS_ON_CLIENT => true,
+ ]);
- $status = $event->status;
- $this->assertSame([], $status->metadata);
- $this->assertSame(Grpc\STATUS_OK, $status->code);
- $this->assertSame($status_text, $status->details);
+ $status = $event->status;
+ $this->assertSame([], $status->metadata);
+ $this->assertSame(Grpc\STATUS_OK, $status->code);
+ $this->assertSame($status_text, $status->details);
- unset($call);
- unset($server_call);
- }
+ unset($call);
+ unset($server_call);
+ }
- public function testMessageWriteFlags() {
- $deadline = Grpc\Timeval::infFuture();
- $req_text = 'message_write_flags_test';
- $status_text = 'xyz';
- $call = new Grpc\Call($this->channel,
- 'dummy_method',
- $deadline);
+ public function testMessageWriteFlags()
+ {
+ $deadline = Grpc\Timeval::infFuture();
+ $req_text = 'message_write_flags_test';
+ $status_text = 'xyz';
+ $call = new Grpc\Call($this->channel,
+ 'dummy_method',
+ $deadline);
- $event = $call->startBatch([
- Grpc\OP_SEND_INITIAL_METADATA => [],
- Grpc\OP_SEND_MESSAGE => ['message' => $req_text,
- 'flags' => Grpc\WRITE_NO_COMPRESS],
- Grpc\OP_SEND_CLOSE_FROM_CLIENT => true
- ]);
+ $event = $call->startBatch([
+ Grpc\OP_SEND_INITIAL_METADATA => [],
+ Grpc\OP_SEND_MESSAGE => ['message' => $req_text,
+ 'flags' => Grpc\WRITE_NO_COMPRESS, ],
+ Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
+ ]);
- $this->assertTrue($event->send_metadata);
- $this->assertTrue($event->send_close);
+ $this->assertTrue($event->send_metadata);
+ $this->assertTrue($event->send_close);
- $event = $this->server->requestCall();
- $this->assertSame('dummy_method', $event->method);
- $server_call = $event->call;
+ $event = $this->server->requestCall();
+ $this->assertSame('dummy_method', $event->method);
+ $server_call = $event->call;
- $event = $server_call->startBatch([
- Grpc\OP_SEND_INITIAL_METADATA => [],
- Grpc\OP_SEND_STATUS_FROM_SERVER => [
- 'metadata' => [],
- 'code' => Grpc\STATUS_OK,
- 'details' => $status_text
- ],
- ]);
+ $event = $server_call->startBatch([
+ Grpc\OP_SEND_INITIAL_METADATA => [],
+ Grpc\OP_SEND_STATUS_FROM_SERVER => [
+ 'metadata' => [],
+ 'code' => Grpc\STATUS_OK,
+ 'details' => $status_text,
+ ],
+ ]);
- $event = $call->startBatch([
- Grpc\OP_RECV_INITIAL_METADATA => true,
- Grpc\OP_RECV_STATUS_ON_CLIENT => true
- ]);
+ $event = $call->startBatch([
+ Grpc\OP_RECV_INITIAL_METADATA => true,
+ Grpc\OP_RECV_STATUS_ON_CLIENT => true,
+ ]);
- $status = $event->status;
- $this->assertSame([], $status->metadata);
- $this->assertSame(Grpc\STATUS_OK, $status->code);
- $this->assertSame($status_text, $status->details);
+ $status = $event->status;
+ $this->assertSame([], $status->metadata);
+ $this->assertSame(Grpc\STATUS_OK, $status->code);
+ $this->assertSame($status_text, $status->details);
- unset($call);
- unset($server_call);
- }
+ unset($call);
+ unset($server_call);
+ }
- public function testClientServerFullRequestResponse() {
- $deadline = Grpc\Timeval::infFuture();
- $req_text = 'client_server_full_request_response';
- $reply_text = 'reply:client_server_full_request_response';
- $status_text = 'status:client_server_full_response_text';
+ public function testClientServerFullRequestResponse()
+ {
+ $deadline = Grpc\Timeval::infFuture();
+ $req_text = 'client_server_full_request_response';
+ $reply_text = 'reply:client_server_full_request_response';
+ $status_text = 'status:client_server_full_response_text';
- $call = new Grpc\Call($this->channel,
- 'dummy_method',
- $deadline);
+ $call = new Grpc\Call($this->channel,
+ 'dummy_method',
+ $deadline);
- $event = $call->startBatch([
- Grpc\OP_SEND_INITIAL_METADATA => [],
- Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
- Grpc\OP_SEND_MESSAGE => ['message' => $req_text],
- ]);
+ $event = $call->startBatch([
+ Grpc\OP_SEND_INITIAL_METADATA => [],
+ Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
+ Grpc\OP_SEND_MESSAGE => ['message' => $req_text],
+ ]);
- $this->assertTrue($event->send_metadata);
- $this->assertTrue($event->send_close);
- $this->assertTrue($event->send_message);
+ $this->assertTrue($event->send_metadata);
+ $this->assertTrue($event->send_close);
+ $this->assertTrue($event->send_message);
- $event = $this->server->requestCall();
- $this->assertSame('dummy_method', $event->method);
- $server_call = $event->call;
+ $event = $this->server->requestCall();
+ $this->assertSame('dummy_method', $event->method);
+ $server_call = $event->call;
- $event = $server_call->startBatch([
- Grpc\OP_SEND_INITIAL_METADATA => [],
- Grpc\OP_SEND_MESSAGE => ['message' => $reply_text],
- Grpc\OP_SEND_STATUS_FROM_SERVER => [
- 'metadata' => [],
- 'code' => Grpc\STATUS_OK,
- 'details' => $status_text
- ],
- Grpc\OP_RECV_MESSAGE => true,
- Grpc\OP_RECV_CLOSE_ON_SERVER => true,
- ]);
+ $event = $server_call->startBatch([
+ Grpc\OP_SEND_INITIAL_METADATA => [],
+ Grpc\OP_SEND_MESSAGE => ['message' => $reply_text],
+ Grpc\OP_SEND_STATUS_FROM_SERVER => [
+ 'metadata' => [],
+ 'code' => Grpc\STATUS_OK,
+ 'details' => $status_text,
+ ],
+ Grpc\OP_RECV_MESSAGE => true,
+ Grpc\OP_RECV_CLOSE_ON_SERVER => true,
+ ]);
- $this->assertTrue($event->send_metadata);
- $this->assertTrue($event->send_status);
- $this->assertTrue($event->send_message);
- $this->assertFalse($event->cancelled);
- $this->assertSame($req_text, $event->message);
+ $this->assertTrue($event->send_metadata);
+ $this->assertTrue($event->send_status);
+ $this->assertTrue($event->send_message);
+ $this->assertFalse($event->cancelled);
+ $this->assertSame($req_text, $event->message);
- $event = $call->startBatch([
- Grpc\OP_RECV_INITIAL_METADATA => true,
- Grpc\OP_RECV_MESSAGE => true,
- Grpc\OP_RECV_STATUS_ON_CLIENT => true,
- ]);
+ $event = $call->startBatch([
+ Grpc\OP_RECV_INITIAL_METADATA => true,
+ Grpc\OP_RECV_MESSAGE => true,
+ Grpc\OP_RECV_STATUS_ON_CLIENT => true,
+ ]);
- $this->assertSame([], $event->metadata);
- $this->assertSame($reply_text, $event->message);
- $status = $event->status;
- $this->assertSame([], $status->metadata);
- $this->assertSame(Grpc\STATUS_OK, $status->code);
- $this->assertSame($status_text, $status->details);
+ $this->assertSame([], $event->metadata);
+ $this->assertSame($reply_text, $event->message);
+ $status = $event->status;
+ $this->assertSame([], $status->metadata);
+ $this->assertSame(Grpc\STATUS_OK, $status->code);
+ $this->assertSame($status_text, $status->details);
- unset($call);
- unset($server_call);
- }
+ unset($call);
+ unset($server_call);
+ }
- public function testGetTarget() {
- $this->assertTrue(is_string($this->channel->getTarget()));
- }
+ public function testGetTarget()
+ {
+ $this->assertTrue(is_string($this->channel->getTarget()));
+ }
- public function testGetConnectivityState() {
- $this->assertTrue($this->channel->getConnectivityState() == Grpc\CHANNEL_IDLE);
- }
+ public function testGetConnectivityState()
+ {
+ $this->assertTrue($this->channel->getConnectivityState() == Grpc\CHANNEL_IDLE);
+ }
- public function testWatchConnectivityStateFailed() {
- $idle_state = $this->channel->getConnectivityState();
- $this->assertTrue($idle_state == Grpc\CHANNEL_IDLE);
+ public function testWatchConnectivityStateFailed()
+ {
+ $idle_state = $this->channel->getConnectivityState();
+ $this->assertTrue($idle_state == Grpc\CHANNEL_IDLE);
- $now = Grpc\Timeval::now();
- $delta = new Grpc\Timeval(500000); // should timeout
- $deadline = $now->add($delta);
+ $now = Grpc\Timeval::now();
+ $delta = new Grpc\Timeval(500000); // should timeout
+ $deadline = $now->add($delta);
- $this->assertFalse($this->channel->watchConnectivityState(
+ $this->assertFalse($this->channel->watchConnectivityState(
$idle_state, $deadline));
- }
+ }
- public function testWatchConnectivityStateSuccess() {
- $idle_state = $this->channel->getConnectivityState(true);
- $this->assertTrue($idle_state == Grpc\CHANNEL_IDLE);
+ public function testWatchConnectivityStateSuccess()
+ {
+ $idle_state = $this->channel->getConnectivityState(true);
+ $this->assertTrue($idle_state == Grpc\CHANNEL_IDLE);
- $now = Grpc\Timeval::now();
- $delta = new Grpc\Timeval(3000000); // should finish well before
- $deadline = $now->add($delta);
+ $now = Grpc\Timeval::now();
+ $delta = new Grpc\Timeval(3000000); // should finish well before
+ $deadline = $now->add($delta);
- $this->assertTrue($this->channel->watchConnectivityState(
+ $this->assertTrue($this->channel->watchConnectivityState(
$idle_state, $deadline));
- $new_state = $this->channel->getConnectivityState();
- $this->assertTrue($idle_state != $new_state);
- }
+ $new_state = $this->channel->getConnectivityState();
+ $this->assertTrue($idle_state != $new_state);
+ }
- public function testWatchConnectivityStateDoNothing() {
- $idle_state = $this->channel->getConnectivityState();
- $this->assertTrue($idle_state == Grpc\CHANNEL_IDLE);
+ public function testWatchConnectivityStateDoNothing()
+ {
+ $idle_state = $this->channel->getConnectivityState();
+ $this->assertTrue($idle_state == Grpc\CHANNEL_IDLE);
- $now = Grpc\Timeval::now();
- $delta = new Grpc\Timeval(100000);
- $deadline = $now->add($delta);
+ $now = Grpc\Timeval::now();
+ $delta = new Grpc\Timeval(100000);
+ $deadline = $now->add($delta);
- $this->assertFalse($this->channel->watchConnectivityState(
+ $this->assertFalse($this->channel->watchConnectivityState(
$idle_state, $deadline));
- $new_state = $this->channel->getConnectivityState();
- $this->assertTrue($new_state == Grpc\CHANNEL_IDLE);
- }
+ $new_state = $this->channel->getConnectivityState();
+ $this->assertTrue($new_state == Grpc\CHANNEL_IDLE);
+ }
}
diff --git a/src/php/tests/unit_tests/SecureEndToEndTest.php b/src/php/tests/unit_tests/SecureEndToEndTest.php
index d7fca14..e66bde3 100755
--- a/src/php/tests/unit_tests/SecureEndToEndTest.php
+++ b/src/php/tests/unit_tests/SecureEndToEndTest.php
@@ -31,186 +31,193 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-class SecureEndToEndTest extends PHPUnit_Framework_TestCase{
- public function setUp() {
- $credentials = Grpc\Credentials::createSsl(
- file_get_contents(dirname(__FILE__) . '/../data/ca.pem'));
- $server_credentials = Grpc\ServerCredentials::createSsl(
- null,
- file_get_contents(dirname(__FILE__) . '/../data/server1.key'),
- file_get_contents(dirname(__FILE__) . '/../data/server1.pem'));
- $this->server = new Grpc\Server();
- $this->port = $this->server->addSecureHttp2Port('0.0.0.0:0',
+class SecureEndToEndTest extends PHPUnit_Framework_TestCase
+{
+ public function setUp()
+ {
+ $credentials = Grpc\Credentials::createSsl(
+ file_get_contents(dirname(__FILE__).'/../data/ca.pem'));
+ $server_credentials = Grpc\ServerCredentials::createSsl(
+ null,
+ file_get_contents(dirname(__FILE__).'/../data/server1.key'),
+ file_get_contents(dirname(__FILE__).'/../data/server1.pem'));
+ $this->server = new Grpc\Server();
+ $this->port = $this->server->addSecureHttp2Port('0.0.0.0:0',
$server_credentials);
- $this->server->start();
- $this->host_override = 'foo.test.google.fr';
- $this->channel = new Grpc\Channel(
- 'localhost:' . $this->port,
- [
+ $this->server->start();
+ $this->host_override = 'foo.test.google.fr';
+ $this->channel = new Grpc\Channel(
+ 'localhost:'.$this->port,
+ [
'grpc.ssl_target_name_override' => $this->host_override,
'grpc.default_authority' => $this->host_override,
- 'credentials' => $credentials
- ]);
- }
+ 'credentials' => $credentials,
+ ]
+ );
+ }
- public function tearDown() {
- unset($this->channel);
- unset($this->server);
- }
+ public function tearDown()
+ {
+ unset($this->channel);
+ unset($this->server);
+ }
- public function testSimpleRequestBody() {
- $deadline = Grpc\Timeval::infFuture();
- $status_text = 'xyz';
- $call = new Grpc\Call($this->channel,
- 'dummy_method',
- $deadline,
- $this->host_override);
+ public function testSimpleRequestBody()
+ {
+ $deadline = Grpc\Timeval::infFuture();
+ $status_text = 'xyz';
+ $call = new Grpc\Call($this->channel,
+ 'dummy_method',
+ $deadline,
+ $this->host_override);
- $event = $call->startBatch([
- Grpc\OP_SEND_INITIAL_METADATA => [],
- Grpc\OP_SEND_CLOSE_FROM_CLIENT => true
- ]);
+ $event = $call->startBatch([
+ Grpc\OP_SEND_INITIAL_METADATA => [],
+ Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
+ ]);
- $this->assertTrue($event->send_metadata);
- $this->assertTrue($event->send_close);
+ $this->assertTrue($event->send_metadata);
+ $this->assertTrue($event->send_close);
- $event = $this->server->requestCall();
- $this->assertSame('dummy_method', $event->method);
- $server_call = $event->call;
+ $event = $this->server->requestCall();
+ $this->assertSame('dummy_method', $event->method);
+ $server_call = $event->call;
- $event = $server_call->startBatch([
- Grpc\OP_SEND_INITIAL_METADATA => [],
- Grpc\OP_SEND_STATUS_FROM_SERVER => [
- 'metadata' => [],
- 'code' => Grpc\STATUS_OK,
- 'details' => $status_text
- ],
- Grpc\OP_RECV_CLOSE_ON_SERVER => true
- ]);
+ $event = $server_call->startBatch([
+ Grpc\OP_SEND_INITIAL_METADATA => [],
+ Grpc\OP_SEND_STATUS_FROM_SERVER => [
+ 'metadata' => [],
+ 'code' => Grpc\STATUS_OK,
+ 'details' => $status_text,
+ ],
+ Grpc\OP_RECV_CLOSE_ON_SERVER => true,
+ ]);
- $this->assertTrue($event->send_metadata);
- $this->assertTrue($event->send_status);
- $this->assertFalse($event->cancelled);
+ $this->assertTrue($event->send_metadata);
+ $this->assertTrue($event->send_status);
+ $this->assertFalse($event->cancelled);
- $event = $call->startBatch([
- Grpc\OP_RECV_INITIAL_METADATA => true,
- Grpc\OP_RECV_STATUS_ON_CLIENT => true
- ]);
+ $event = $call->startBatch([
+ Grpc\OP_RECV_INITIAL_METADATA => true,
+ Grpc\OP_RECV_STATUS_ON_CLIENT => true,
+ ]);
- $this->assertSame([], $event->metadata);
- $status = $event->status;
- $this->assertSame([], $status->metadata);
- $this->assertSame(Grpc\STATUS_OK, $status->code);
- $this->assertSame($status_text, $status->details);
+ $this->assertSame([], $event->metadata);
+ $status = $event->status;
+ $this->assertSame([], $status->metadata);
+ $this->assertSame(Grpc\STATUS_OK, $status->code);
+ $this->assertSame($status_text, $status->details);
- unset($call);
- unset($server_call);
- }
+ unset($call);
+ unset($server_call);
+ }
- public function testMessageWriteFlags() {
- $deadline = Grpc\Timeval::infFuture();
- $req_text = 'message_write_flags_test';
- $status_text = 'xyz';
- $call = new Grpc\Call($this->channel,
- 'dummy_method',
- $deadline,
- $this->host_override);
+ public function testMessageWriteFlags()
+ {
+ $deadline = Grpc\Timeval::infFuture();
+ $req_text = 'message_write_flags_test';
+ $status_text = 'xyz';
+ $call = new Grpc\Call($this->channel,
+ 'dummy_method',
+ $deadline,
+ $this->host_override);
- $event = $call->startBatch([
- Grpc\OP_SEND_INITIAL_METADATA => [],
- Grpc\OP_SEND_MESSAGE => ['message' => $req_text,
- 'flags' => Grpc\WRITE_NO_COMPRESS],
- Grpc\OP_SEND_CLOSE_FROM_CLIENT => true
- ]);
+ $event = $call->startBatch([
+ Grpc\OP_SEND_INITIAL_METADATA => [],
+ Grpc\OP_SEND_MESSAGE => ['message' => $req_text,
+ 'flags' => Grpc\WRITE_NO_COMPRESS, ],
+ Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
+ ]);
- $this->assertTrue($event->send_metadata);
- $this->assertTrue($event->send_close);
+ $this->assertTrue($event->send_metadata);
+ $this->assertTrue($event->send_close);
- $event = $this->server->requestCall();
- $this->assertSame('dummy_method', $event->method);
- $server_call = $event->call;
+ $event = $this->server->requestCall();
+ $this->assertSame('dummy_method', $event->method);
+ $server_call = $event->call;
- $event = $server_call->startBatch([
- Grpc\OP_SEND_INITIAL_METADATA => [],
- Grpc\OP_SEND_STATUS_FROM_SERVER => [
- 'metadata' => [],
- 'code' => Grpc\STATUS_OK,
- 'details' => $status_text
- ],
- ]);
+ $event = $server_call->startBatch([
+ Grpc\OP_SEND_INITIAL_METADATA => [],
+ Grpc\OP_SEND_STATUS_FROM_SERVER => [
+ 'metadata' => [],
+ 'code' => Grpc\STATUS_OK,
+ 'details' => $status_text,
+ ],
+ ]);
- $event = $call->startBatch([
- Grpc\OP_RECV_INITIAL_METADATA => true,
- Grpc\OP_RECV_STATUS_ON_CLIENT => true
- ]);
+ $event = $call->startBatch([
+ Grpc\OP_RECV_INITIAL_METADATA => true,
+ Grpc\OP_RECV_STATUS_ON_CLIENT => true,
+ ]);
- $this->assertSame([], $event->metadata);
- $status = $event->status;
- $this->assertSame([], $status->metadata);
- $this->assertSame(Grpc\STATUS_OK, $status->code);
- $this->assertSame($status_text, $status->details);
+ $this->assertSame([], $event->metadata);
+ $status = $event->status;
+ $this->assertSame([], $status->metadata);
+ $this->assertSame(Grpc\STATUS_OK, $status->code);
+ $this->assertSame($status_text, $status->details);
- unset($call);
- unset($server_call);
- }
+ unset($call);
+ unset($server_call);
+ }
- public function testClientServerFullRequestResponse() {
- $deadline = Grpc\Timeval::infFuture();
- $req_text = 'client_server_full_request_response';
- $reply_text = 'reply:client_server_full_request_response';
- $status_text = 'status:client_server_full_response_text';
+ public function testClientServerFullRequestResponse()
+ {
+ $deadline = Grpc\Timeval::infFuture();
+ $req_text = 'client_server_full_request_response';
+ $reply_text = 'reply:client_server_full_request_response';
+ $status_text = 'status:client_server_full_response_text';
- $call = new Grpc\Call($this->channel,
- 'dummy_method',
- $deadline,
- $this->host_override);
+ $call = new Grpc\Call($this->channel,
+ 'dummy_method',
+ $deadline,
+ $this->host_override);
- $event = $call->startBatch([
- Grpc\OP_SEND_INITIAL_METADATA => [],
- Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
- Grpc\OP_SEND_MESSAGE => ['message' => $req_text]
- ]);
+ $event = $call->startBatch([
+ Grpc\OP_SEND_INITIAL_METADATA => [],
+ Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
+ Grpc\OP_SEND_MESSAGE => ['message' => $req_text],
+ ]);
- $this->assertTrue($event->send_metadata);
- $this->assertTrue($event->send_close);
- $this->assertTrue($event->send_message);
+ $this->assertTrue($event->send_metadata);
+ $this->assertTrue($event->send_close);
+ $this->assertTrue($event->send_message);
- $event = $this->server->requestCall();
- $this->assertSame('dummy_method', $event->method);
- $server_call = $event->call;
+ $event = $this->server->requestCall();
+ $this->assertSame('dummy_method', $event->method);
+ $server_call = $event->call;
- $event = $server_call->startBatch([
- Grpc\OP_SEND_INITIAL_METADATA => [],
- Grpc\OP_SEND_MESSAGE => ['message' => $reply_text],
- Grpc\OP_SEND_STATUS_FROM_SERVER => [
- 'metadata' => [],
- 'code' => Grpc\STATUS_OK,
- 'details' => $status_text
- ],
- Grpc\OP_RECV_MESSAGE => true,
- Grpc\OP_RECV_CLOSE_ON_SERVER => true,
- ]);
+ $event = $server_call->startBatch([
+ Grpc\OP_SEND_INITIAL_METADATA => [],
+ Grpc\OP_SEND_MESSAGE => ['message' => $reply_text],
+ Grpc\OP_SEND_STATUS_FROM_SERVER => [
+ 'metadata' => [],
+ 'code' => Grpc\STATUS_OK,
+ 'details' => $status_text,
+ ],
+ Grpc\OP_RECV_MESSAGE => true,
+ Grpc\OP_RECV_CLOSE_ON_SERVER => true,
+ ]);
- $this->assertTrue($event->send_metadata);
- $this->assertTrue($event->send_status);
- $this->assertTrue($event->send_message);
- $this->assertFalse($event->cancelled);
- $this->assertSame($req_text, $event->message);
+ $this->assertTrue($event->send_metadata);
+ $this->assertTrue($event->send_status);
+ $this->assertTrue($event->send_message);
+ $this->assertFalse($event->cancelled);
+ $this->assertSame($req_text, $event->message);
- $event = $call->startBatch([
- Grpc\OP_RECV_INITIAL_METADATA => true,
- Grpc\OP_RECV_MESSAGE => true,
- Grpc\OP_RECV_STATUS_ON_CLIENT => true,
- ]);
+ $event = $call->startBatch([
+ Grpc\OP_RECV_INITIAL_METADATA => true,
+ Grpc\OP_RECV_MESSAGE => true,
+ Grpc\OP_RECV_STATUS_ON_CLIENT => true,
+ ]);
- $this->assertSame([], $event->metadata);
- $this->assertSame($reply_text, $event->message);
- $status = $event->status;
- $this->assertSame([], $status->metadata);
- $this->assertSame(Grpc\STATUS_OK, $status->code);
- $this->assertSame($status_text, $status->details);
+ $this->assertSame([], $event->metadata);
+ $this->assertSame($reply_text, $event->message);
+ $status = $event->status;
+ $this->assertSame([], $status->metadata);
+ $this->assertSame(Grpc\STATUS_OK, $status->code);
+ $this->assertSame($status_text, $status->details);
- unset($call);
- unset($server_call);
- }
+ unset($call);
+ unset($server_call);
+ }
}
diff --git a/src/php/tests/unit_tests/TimevalTest.php b/src/php/tests/unit_tests/TimevalTest.php
index 7b4925c..1d2a8d3 100755
--- a/src/php/tests/unit_tests/TimevalTest.php
+++ b/src/php/tests/unit_tests/TimevalTest.php
@@ -31,56 +31,64 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-class TimevalTest extends PHPUnit_Framework_TestCase{
- public function testCompareSame() {
- $zero = Grpc\Timeval::zero();
- $this->assertSame(0, Grpc\Timeval::compare($zero, $zero));
- }
+class TimevalTest extends PHPUnit_Framework_TestCase
+{
+ public function testCompareSame()
+ {
+ $zero = Grpc\Timeval::zero();
+ $this->assertSame(0, Grpc\Timeval::compare($zero, $zero));
+ }
- public function testPastIsLessThanZero() {
- $zero = Grpc\Timeval::zero();
- $past = Grpc\Timeval::infPast();
- $this->assertLessThan(0, Grpc\Timeval::compare($past, $zero));
- $this->assertGreaterThan(0, Grpc\Timeval::compare($zero, $past));
- }
+ public function testPastIsLessThanZero()
+ {
+ $zero = Grpc\Timeval::zero();
+ $past = Grpc\Timeval::infPast();
+ $this->assertLessThan(0, Grpc\Timeval::compare($past, $zero));
+ $this->assertGreaterThan(0, Grpc\Timeval::compare($zero, $past));
+ }
- public function testFutureIsGreaterThanZero() {
- $zero = Grpc\Timeval::zero();
- $future = Grpc\Timeval::infFuture();
- $this->assertLessThan(0, Grpc\Timeval::compare($zero, $future));
- $this->assertGreaterThan(0, Grpc\Timeval::compare($future, $zero));
- }
+ public function testFutureIsGreaterThanZero()
+ {
+ $zero = Grpc\Timeval::zero();
+ $future = Grpc\Timeval::infFuture();
+ $this->assertLessThan(0, Grpc\Timeval::compare($zero, $future));
+ $this->assertGreaterThan(0, Grpc\Timeval::compare($future, $zero));
+ }
- /**
- * @depends testFutureIsGreaterThanZero
- */
- public function testNowIsBetweenZeroAndFuture() {
- $zero = Grpc\Timeval::zero();
- $future = Grpc\Timeval::infFuture();
- $now = Grpc\Timeval::now();
- $this->assertLessThan(0, Grpc\Timeval::compare($zero, $now));
- $this->assertLessThan(0, Grpc\Timeval::compare($now, $future));
- }
+ /**
+ * @depends testFutureIsGreaterThanZero
+ */
+ public function testNowIsBetweenZeroAndFuture()
+ {
+ $zero = Grpc\Timeval::zero();
+ $future = Grpc\Timeval::infFuture();
+ $now = Grpc\Timeval::now();
+ $this->assertLessThan(0, Grpc\Timeval::compare($zero, $now));
+ $this->assertLessThan(0, Grpc\Timeval::compare($now, $future));
+ }
- public function testNowAndAdd() {
- $now = Grpc\Timeval::now();
- $delta = new Grpc\Timeval(1000);
- $deadline = $now->add($delta);
- $this->assertGreaterThan(0, Grpc\Timeval::compare($deadline, $now));
- }
+ public function testNowAndAdd()
+ {
+ $now = Grpc\Timeval::now();
+ $delta = new Grpc\Timeval(1000);
+ $deadline = $now->add($delta);
+ $this->assertGreaterThan(0, Grpc\Timeval::compare($deadline, $now));
+ }
- public function testNowAndSubtract() {
- $now = Grpc\Timeval::now();
- $delta = new Grpc\Timeval(1000);
- $deadline = $now->subtract($delta);
- $this->assertLessThan(0, Grpc\Timeval::compare($deadline, $now));
- }
+ public function testNowAndSubtract()
+ {
+ $now = Grpc\Timeval::now();
+ $delta = new Grpc\Timeval(1000);
+ $deadline = $now->subtract($delta);
+ $this->assertLessThan(0, Grpc\Timeval::compare($deadline, $now));
+ }
- public function testAddAndSubtract() {
- $now = Grpc\Timeval::now();
- $delta = new Grpc\Timeval(1000);
- $deadline = $now->add($delta);
- $back_to_now = $deadline->subtract($delta);
- $this->assertSame(0, Grpc\Timeval::compare($back_to_now, $now));
- }
+ public function testAddAndSubtract()
+ {
+ $now = Grpc\Timeval::now();
+ $delta = new Grpc\Timeval(1000);
+ $deadline = $now->add($delta);
+ $back_to_now = $deadline->subtract($delta);
+ $this->assertSame(0, Grpc\Timeval::compare($back_to_now, $now));
+ }
}
diff --git a/src/python/grpcio/grpc/early_adopter/__init__.py b/src/python/grpcio/grpc/early_adopter/__init__.py
index 7086519..bff74be 100644
--- a/src/python/grpcio/grpc/early_adopter/__init__.py
+++ b/src/python/grpcio/grpc/early_adopter/__init__.py
@@ -27,4 +27,9 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+import warnings
+warnings.simplefilter('always', DeprecationWarning)
+warnings.warn('the alpha API (includes this package) is deprecated, '
+ 'unmaintained, and no longer tested. Please migrate to the beta '
+ 'API.', DeprecationWarning, stacklevel=2)
diff --git a/src/python/grpcio/grpc/framework/alpha/__init__.py b/src/python/grpcio/grpc/framework/alpha/__init__.py
index b893988..bff74be 100644
--- a/src/python/grpcio/grpc/framework/alpha/__init__.py
+++ b/src/python/grpcio/grpc/framework/alpha/__init__.py
@@ -26,3 +26,10 @@
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import warnings
+
+warnings.simplefilter('always', DeprecationWarning)
+warnings.warn('the alpha API (includes this package) is deprecated, '
+ 'unmaintained, and no longer tested. Please migrate to the beta '
+ 'API.', DeprecationWarning, stacklevel=2)
diff --git a/src/python/grpcio/grpc/framework/base/__init__.py b/src/python/grpcio/grpc/framework/base/__init__.py
index 7086519..bff74be 100644
--- a/src/python/grpcio/grpc/framework/base/__init__.py
+++ b/src/python/grpcio/grpc/framework/base/__init__.py
@@ -27,4 +27,9 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+import warnings
+warnings.simplefilter('always', DeprecationWarning)
+warnings.warn('the alpha API (includes this package) is deprecated, '
+ 'unmaintained, and no longer tested. Please migrate to the beta '
+ 'API.', DeprecationWarning, stacklevel=2)
diff --git a/src/python/grpcio/grpc/framework/face/__init__.py b/src/python/grpcio/grpc/framework/face/__init__.py
index 7086519..bff74be 100644
--- a/src/python/grpcio/grpc/framework/face/__init__.py
+++ b/src/python/grpcio/grpc/framework/face/__init__.py
@@ -27,4 +27,9 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+import warnings
+warnings.simplefilter('always', DeprecationWarning)
+warnings.warn('the alpha API (includes this package) is deprecated, '
+ 'unmaintained, and no longer tested. Please migrate to the beta '
+ 'API.', DeprecationWarning, stacklevel=2)
diff --git a/src/python/grpcio_health_checking/commands.py b/src/python/grpcio_health_checking/commands.py
index 6a95e67..3f4ea6e 100644
--- a/src/python/grpcio_health_checking/commands.py
+++ b/src/python/grpcio_health_checking/commands.py
@@ -50,7 +50,7 @@
pass
def finalize_options(self):
- self.protoc_command = 'protoc'
+ self.protoc_command = distutils.spawn.find_executable('protoc')
self.grpc_python_plugin_command = distutils.spawn.find_executable(
'grpc_python_plugin')
@@ -69,7 +69,11 @@
'--python_out={}'.format(root_directory),
'--python-grpc_out={}'.format(root_directory),
] + paths
- subprocess.check_call(' '.join(command), cwd=root_directory, shell=True)
+ try:
+ subprocess.check_output(' '.join(command), cwd=root_directory, shell=True,
+ stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as e:
+ raise Exception('{}\nOutput:\n{}'.format(e.message, e.output))
class BuildPy(build_py.build_py):
diff --git a/src/python/grpcio_test/.gitignore b/src/python/grpcio_test/.gitignore
index 4bb4d42..6158313 100644
--- a/src/python/grpcio_test/.gitignore
+++ b/src/python/grpcio_test/.gitignore
@@ -5,6 +5,7 @@
*.egg
*.egg/
*.eggs/
+*_pb2.py
.coverage
.coverage.*
.cache/
diff --git a/src/python/grpcio_test/commands.py b/src/python/grpcio_test/commands.py
index c796d94..edaa2aa 100644
--- a/src/python/grpcio_test/commands.py
+++ b/src/python/grpcio_test/commands.py
@@ -29,11 +29,14 @@
"""Provides distutils command classes for the GRPC Python test setup process."""
+import distutils
import os
import os.path
+import subprocess
import sys
import setuptools
+from setuptools.command import build_py
class RunTests(setuptools.Command):
@@ -52,6 +55,52 @@
# We import here to ensure that setup.py has had a chance to install the
# relevant package eggs first.
import pytest
+
+ self.run_command('build_proto_modules')
result = pytest.main(self.pytest_args)
if result != 0:
raise SystemExit(result)
+
+
+class BuildProtoModules(setuptools.Command):
+ """Command to generate project *_pb2.py modules from proto files."""
+
+ description = ''
+ user_options = []
+
+ def initialize_options(self):
+ pass
+
+ def finalize_options(self):
+ self.protoc_command = distutils.spawn.find_executable('protoc')
+ self.grpc_python_plugin_command = distutils.spawn.find_executable(
+ 'grpc_python_plugin')
+
+ def run(self):
+ paths = []
+ root_directory = os.getcwd()
+ for walk_root, directories, filenames in os.walk(root_directory):
+ for filename in filenames:
+ if filename.endswith('.proto'):
+ paths.append(os.path.join(walk_root, filename))
+ command = [
+ self.protoc_command,
+ '--plugin=protoc-gen-python-grpc={}'.format(
+ self.grpc_python_plugin_command),
+ '-I {}'.format(root_directory),
+ '--python_out={}'.format(root_directory),
+ '--python-grpc_out={}'.format(root_directory),
+ ] + paths
+ try:
+ subprocess.check_output(' '.join(command), cwd=root_directory, shell=True,
+ stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as e:
+ raise Exception('{}\nOutput:\n{}'.format(e.message, e.output))
+
+
+class BuildPy(build_py.build_py):
+ """Custom project build command."""
+
+ def run(self):
+ self.run_command('build_proto_modules')
+ build_py.build_py.run(self)
diff --git a/src/python/grpcio_test/grpc_interop/_insecure_interop_test.py b/src/python/grpcio_test/grpc_interop/_insecure_interop_test.py
index 825988a..5007be2 100644
--- a/src/python/grpcio_test/grpc_interop/_insecure_interop_test.py
+++ b/src/python/grpcio_test/grpc_interop/_insecure_interop_test.py
@@ -31,10 +31,12 @@
import unittest
-from grpc.early_adopter import implementations
+from grpc.beta import implementations
from grpc_interop import _interop_test_case
from grpc_interop import methods
+from grpc_interop import server
+from grpc_interop import test_pb2
class InsecureInteropTest(
@@ -42,15 +44,14 @@
unittest.TestCase):
def setUp(self):
- self.server = implementations.server(
- methods.SERVICE_NAME, methods.SERVER_METHODS, 0)
+ self.server = test_pb2.beta_create_TestService_server(methods.TestService())
+ port = self.server.add_insecure_port('[::]:0')
self.server.start()
- port = self.server.port()
- self.stub = implementations.stub(
- methods.SERVICE_NAME, methods.CLIENT_METHODS, 'localhost', port)
+ self.stub = test_pb2.beta_create_TestService_stub(
+ implementations.insecure_channel('[::]', port))
def tearDown(self):
- self.server.stop()
+ self.server.stop(0)
if __name__ == '__main__':
diff --git a/src/python/grpcio_test/grpc_interop/_secure_interop_test.py b/src/python/grpcio_test/grpc_interop/_secure_interop_test.py
index a2682de..108e15b 100644
--- a/src/python/grpcio_test/grpc_interop/_secure_interop_test.py
+++ b/src/python/grpcio_test/grpc_interop/_secure_interop_test.py
@@ -31,11 +31,14 @@
import unittest
-from grpc.early_adopter import implementations
+from grpc.beta import implementations
+
+from grpc_test.beta import test_utilities
from grpc_interop import _interop_test_case
from grpc_interop import methods
from grpc_interop import resources
+from grpc_interop import test_pb2
_SERVER_HOST_OVERRIDE = 'foo.test.google.fr'
@@ -45,19 +48,19 @@
unittest.TestCase):
def setUp(self):
- self.server = implementations.server(
- methods.SERVICE_NAME, methods.SERVER_METHODS, 0,
- private_key=resources.private_key(),
- certificate_chain=resources.certificate_chain())
+ self.server = test_pb2.beta_create_TestService_server(methods.TestService())
+ port = self.server.add_secure_port(
+ '[::]:0', implementations.ssl_server_credentials(
+ [(resources.private_key(), resources.certificate_chain())]))
self.server.start()
- port = self.server.port()
- self.stub = implementations.stub(
- methods.SERVICE_NAME, methods.CLIENT_METHODS, 'localhost', port,
- secure=True, root_certificates=resources.test_root_certificates(),
- server_host_override=_SERVER_HOST_OVERRIDE)
+ self.stub = test_pb2.beta_create_TestService_stub(
+ test_utilities.not_really_secure_channel(
+ '[::]', port, implementations.ssl_client_credentials(
+ resources.test_root_certificates(), None, None),
+ _SERVER_HOST_OVERRIDE))
def tearDown(self):
- self.server.stop()
+ self.server.stop(0)
if __name__ == '__main__':
diff --git a/src/python/grpcio_test/grpc_interop/client.py b/src/python/grpcio_test/grpc_interop/client.py
index 21e344c..b8d5047 100644
--- a/src/python/grpcio_test/grpc_interop/client.py
+++ b/src/python/grpcio_test/grpc_interop/client.py
@@ -32,10 +32,13 @@
import argparse
from oauth2client import client as oauth2client_client
-from grpc.early_adopter import implementations
+from grpc.beta import implementations
+
+from grpc_test.beta import test_utilities
from grpc_interop import methods
from grpc_interop import resources
+from grpc_interop import test_pb2
_ONE_DAY_IN_SECONDS = 60 * 60 * 24
@@ -90,15 +93,16 @@
else:
root_certificates = resources.prod_root_certificates()
- stub = implementations.stub(
- methods.SERVICE_NAME, methods.CLIENT_METHODS, args.server_host,
- args.server_port, metadata_transformer=metadata_transformer,
- secure=True, root_certificates=root_certificates,
- server_host_override=args.server_host_override)
+ channel = test_utilities.not_really_secure_channel(
+ args.server_host, args.server_port,
+ implementations.ssl_client_credentials(root_certificates, None, None),
+ args.server_host_override)
+ stub = test_pb2.beta_create_TestService_stub(
+ channel, metadata_transformer=metadata_transformer)
else:
- stub = implementations.stub(
- methods.SERVICE_NAME, methods.CLIENT_METHODS, args.server_host,
- args.server_port, secure=False)
+ channel = implementations.insecure_channel(
+ args.server_host, args.server_port)
+ stub = test_pb2.beta_create_TestService_stub(channel)
return stub
diff --git a/src/python/grpcio_test/grpc_interop/empty.proto b/src/python/grpcio_test/grpc_interop/empty.proto
new file mode 100644
index 0000000..6d0eb93
--- /dev/null
+++ b/src/python/grpcio_test/grpc_interop/empty.proto
@@ -0,0 +1,43 @@
+
+// Copyright 2015, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package grpc.testing;
+
+// An empty message that you can re-use to avoid defining duplicated empty
+// messages in your project. A typical example is to use it as argument or the
+// return value of a service API. For instance:
+//
+// service Foo {
+// rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { };
+// };
+//
+message Empty {}
diff --git a/src/python/grpcio_test/grpc_interop/empty_pb2.py b/src/python/grpcio_test/grpc_interop/empty_pb2.py
deleted file mode 100644
index 8c1ce2f..0000000
--- a/src/python/grpcio_test/grpc_interop/empty_pb2.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: test/cpp/interop/empty.proto
-
-import sys
-_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-from google.protobuf import descriptor_pb2
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
- name='test/cpp/interop/empty.proto',
- package='grpc.testing',
- serialized_pb=_b('\n\x1ctest/cpp/interop/empty.proto\x12\x0cgrpc.testing\"\x07\n\x05\x45mpty')
-)
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-
-
-
-_EMPTY = _descriptor.Descriptor(
- name='Empty',
- full_name='grpc.testing.Empty',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- options=None,
- is_extendable=False,
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=46,
- serialized_end=53,
-)
-
-DESCRIPTOR.message_types_by_name['Empty'] = _EMPTY
-
-Empty = _reflection.GeneratedProtocolMessageType('Empty', (_message.Message,), dict(
- DESCRIPTOR = _EMPTY,
- __module__ = 'test.cpp.interop.empty_pb2'
- # @@protoc_insertion_point(class_scope:grpc.testing.Empty)
- ))
-_sym_db.RegisterMessage(Empty)
-
-
-import abc
-from grpc.early_adopter import implementations
-from grpc.framework.alpha import utilities
-# @@protoc_insertion_point(module_scope)
diff --git a/src/python/grpcio_test/grpc_interop/messages.proto b/src/python/grpcio_test/grpc_interop/messages.proto
new file mode 100644
index 0000000..193b6c4
--- /dev/null
+++ b/src/python/grpcio_test/grpc_interop/messages.proto
@@ -0,0 +1,167 @@
+
+// Copyright 2015, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Message definitions to be used by integration test service definitions.
+
+syntax = "proto3";
+
+package grpc.testing;
+
+// The type of payload that should be returned.
+enum PayloadType {
+ // Compressable text format.
+ COMPRESSABLE = 0;
+
+ // Uncompressable binary format.
+ UNCOMPRESSABLE = 1;
+
+ // Randomly chosen from all other formats defined in this enum.
+ RANDOM = 2;
+}
+
+// Compression algorithms
+enum CompressionType {
+ // No compression
+ NONE = 0;
+ GZIP = 1;
+ DEFLATE = 2;
+}
+
+// A block of data, to simply increase gRPC message size.
+message Payload {
+ // The type of data in body.
+ PayloadType type = 1;
+ // Primary contents of payload.
+ bytes body = 2;
+}
+
+// A protobuf representation for grpc status. This is used by test
+// clients to specify a status that the server should attempt to return.
+message EchoStatus {
+ int32 code = 1;
+ string message = 2;
+}
+
+// Unary request.
+message SimpleRequest {
+ // Desired payload type in the response from the server.
+ // If response_type is RANDOM, server randomly chooses one from other formats.
+ PayloadType response_type = 1;
+
+ // Desired payload size in the response from the server.
+ // If response_type is COMPRESSABLE, this denotes the size before compression.
+ int32 response_size = 2;
+
+ // Optional input payload sent along with the request.
+ Payload payload = 3;
+
+ // Whether SimpleResponse should include username.
+ bool fill_username = 4;
+
+ // Whether SimpleResponse should include OAuth scope.
+ bool fill_oauth_scope = 5;
+
+ // Compression algorithm to be used by the server for the response (stream)
+ CompressionType response_compression = 6;
+
+ // Whether server should return a given status
+ EchoStatus response_status = 7;
+}
+
+// Unary response, as configured by the request.
+message SimpleResponse {
+ // Payload to increase message size.
+ Payload payload = 1;
+ // The user the request came from, for verifying authentication was
+ // successful when the client expected it.
+ string username = 2;
+ // OAuth scope.
+ string oauth_scope = 3;
+}
+
+// Client-streaming request.
+message StreamingInputCallRequest {
+ // Optional input payload sent along with the request.
+ Payload payload = 1;
+
+ // Not expecting any payload from the response.
+}
+
+// Client-streaming response.
+message StreamingInputCallResponse {
+ // Aggregated size of payloads received from the client.
+ int32 aggregated_payload_size = 1;
+}
+
+// Configuration for a particular response.
+message ResponseParameters {
+ // Desired payload sizes in responses from the server.
+ // If response_type is COMPRESSABLE, this denotes the size before compression.
+ int32 size = 1;
+
+ // Desired interval between consecutive responses in the response stream in
+ // microseconds.
+ int32 interval_us = 2;
+}
+
+// Server-streaming request.
+message StreamingOutputCallRequest {
+ // Desired payload type in the response from the server.
+ // If response_type is RANDOM, the payload from each response in the stream
+ // might be of different types. This is to simulate a mixed type of payload
+ // stream.
+ PayloadType response_type = 1;
+
+ // Configuration for each expected response message.
+ repeated ResponseParameters response_parameters = 2;
+
+ // Optional input payload sent along with the request.
+ Payload payload = 3;
+
+ // Compression algorithm to be used by the server for the response (stream)
+ CompressionType response_compression = 6;
+
+ // Whether server should return a given status
+ EchoStatus response_status = 7;
+}
+
+// Server-streaming response, as configured by the request and parameters.
+message StreamingOutputCallResponse {
+ // Payload to increase response size.
+ Payload payload = 1;
+}
+
+// For reconnect interop test only.
+// Server tells client whether its reconnects are following the spec and the
+// reconnect backoffs it saw.
+message ReconnectInfo {
+ bool passed = 1;
+ repeated int32 backoff_ms = 2;
+}
diff --git a/src/python/grpcio_test/grpc_interop/messages_pb2.py b/src/python/grpcio_test/grpc_interop/messages_pb2.py
deleted file mode 100644
index 0bf3d86..0000000
--- a/src/python/grpcio_test/grpc_interop/messages_pb2.py
+++ /dev/null
@@ -1,447 +0,0 @@
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: test/cpp/interop/messages.proto
-
-import sys
-_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
-from google.protobuf.internal import enum_type_wrapper
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-from google.protobuf import descriptor_pb2
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
- name='test/cpp/interop/messages.proto',
- package='grpc.testing',
- serialized_pb=_b('\n\x1ftest/cpp/interop/messages.proto\x12\x0cgrpc.testing\"@\n\x07Payload\x12\'\n\x04type\x18\x01 \x01(\x0e\x32\x19.grpc.testing.PayloadType\x12\x0c\n\x04\x62ody\x18\x02 \x01(\x0c\"\xb1\x01\n\rSimpleRequest\x12\x30\n\rresponse_type\x18\x01 \x01(\x0e\x32\x19.grpc.testing.PayloadType\x12\x15\n\rresponse_size\x18\x02 \x01(\x05\x12&\n\x07payload\x18\x03 \x01(\x0b\x32\x15.grpc.testing.Payload\x12\x15\n\rfill_username\x18\x04 \x01(\x08\x12\x18\n\x10\x66ill_oauth_scope\x18\x05 \x01(\x08\"_\n\x0eSimpleResponse\x12&\n\x07payload\x18\x01 \x01(\x0b\x32\x15.grpc.testing.Payload\x12\x10\n\x08username\x18\x02 \x01(\t\x12\x13\n\x0boauth_scope\x18\x03 \x01(\t\"C\n\x19StreamingInputCallRequest\x12&\n\x07payload\x18\x01 \x01(\x0b\x32\x15.grpc.testing.Payload\"=\n\x1aStreamingInputCallResponse\x12\x1f\n\x17\x61ggregated_payload_size\x18\x01 \x01(\x05\"7\n\x12ResponseParameters\x12\x0c\n\x04size\x18\x01 \x01(\x05\x12\x13\n\x0binterval_us\x18\x02 \x01(\x05\"\xb5\x01\n\x1aStreamingOutputCallRequest\x12\x30\n\rresponse_type\x18\x01 \x01(\x0e\x32\x19.grpc.testing.PayloadType\x12=\n\x13response_parameters\x18\x02 \x03(\x0b\x32 .grpc.testing.ResponseParameters\x12&\n\x07payload\x18\x03 \x01(\x0b\x32\x15.grpc.testing.Payload\"E\n\x1bStreamingOutputCallResponse\x12&\n\x07payload\x18\x01 \x01(\x0b\x32\x15.grpc.testing.Payload*?\n\x0bPayloadType\x12\x10\n\x0c\x43OMPRESSABLE\x10\x00\x12\x12\n\x0eUNCOMPRESSABLE\x10\x01\x12\n\n\x06RANDOM\x10\x02')
-)
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-_PAYLOADTYPE = _descriptor.EnumDescriptor(
- name='PayloadType',
- full_name='grpc.testing.PayloadType',
- filename=None,
- file=DESCRIPTOR,
- values=[
- _descriptor.EnumValueDescriptor(
- name='COMPRESSABLE', index=0, number=0,
- options=None,
- type=None),
- _descriptor.EnumValueDescriptor(
- name='UNCOMPRESSABLE', index=1, number=1,
- options=None,
- type=None),
- _descriptor.EnumValueDescriptor(
- name='RANDOM', index=2, number=2,
- options=None,
- type=None),
- ],
- containing_type=None,
- options=None,
- serialized_start=836,
- serialized_end=899,
-)
-_sym_db.RegisterEnumDescriptor(_PAYLOADTYPE)
-
-PayloadType = enum_type_wrapper.EnumTypeWrapper(_PAYLOADTYPE)
-COMPRESSABLE = 0
-UNCOMPRESSABLE = 1
-RANDOM = 2
-
-
-
-_PAYLOAD = _descriptor.Descriptor(
- name='Payload',
- full_name='grpc.testing.Payload',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='type', full_name='grpc.testing.Payload.type', index=0,
- number=1, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- _descriptor.FieldDescriptor(
- name='body', full_name='grpc.testing.Payload.body', index=1,
- number=2, type=12, cpp_type=9, label=1,
- has_default_value=False, default_value=_b(""),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- options=None,
- is_extendable=False,
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=49,
- serialized_end=113,
-)
-
-
-_SIMPLEREQUEST = _descriptor.Descriptor(
- name='SimpleRequest',
- full_name='grpc.testing.SimpleRequest',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='response_type', full_name='grpc.testing.SimpleRequest.response_type', index=0,
- number=1, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- _descriptor.FieldDescriptor(
- name='response_size', full_name='grpc.testing.SimpleRequest.response_size', index=1,
- number=2, type=5, cpp_type=1, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- _descriptor.FieldDescriptor(
- name='payload', full_name='grpc.testing.SimpleRequest.payload', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- _descriptor.FieldDescriptor(
- name='fill_username', full_name='grpc.testing.SimpleRequest.fill_username', index=3,
- number=4, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- _descriptor.FieldDescriptor(
- name='fill_oauth_scope', full_name='grpc.testing.SimpleRequest.fill_oauth_scope', index=4,
- number=5, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- options=None,
- is_extendable=False,
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=116,
- serialized_end=293,
-)
-
-
-_SIMPLERESPONSE = _descriptor.Descriptor(
- name='SimpleResponse',
- full_name='grpc.testing.SimpleResponse',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='payload', full_name='grpc.testing.SimpleResponse.payload', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- _descriptor.FieldDescriptor(
- name='username', full_name='grpc.testing.SimpleResponse.username', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=_b("").decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- _descriptor.FieldDescriptor(
- name='oauth_scope', full_name='grpc.testing.SimpleResponse.oauth_scope', index=2,
- number=3, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=_b("").decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- options=None,
- is_extendable=False,
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=295,
- serialized_end=390,
-)
-
-
-_STREAMINGINPUTCALLREQUEST = _descriptor.Descriptor(
- name='StreamingInputCallRequest',
- full_name='grpc.testing.StreamingInputCallRequest',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='payload', full_name='grpc.testing.StreamingInputCallRequest.payload', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- options=None,
- is_extendable=False,
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=392,
- serialized_end=459,
-)
-
-
-_STREAMINGINPUTCALLRESPONSE = _descriptor.Descriptor(
- name='StreamingInputCallResponse',
- full_name='grpc.testing.StreamingInputCallResponse',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='aggregated_payload_size', full_name='grpc.testing.StreamingInputCallResponse.aggregated_payload_size', index=0,
- number=1, type=5, cpp_type=1, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- options=None,
- is_extendable=False,
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=461,
- serialized_end=522,
-)
-
-
-_RESPONSEPARAMETERS = _descriptor.Descriptor(
- name='ResponseParameters',
- full_name='grpc.testing.ResponseParameters',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='size', full_name='grpc.testing.ResponseParameters.size', index=0,
- number=1, type=5, cpp_type=1, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- _descriptor.FieldDescriptor(
- name='interval_us', full_name='grpc.testing.ResponseParameters.interval_us', index=1,
- number=2, type=5, cpp_type=1, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- options=None,
- is_extendable=False,
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=524,
- serialized_end=579,
-)
-
-
-_STREAMINGOUTPUTCALLREQUEST = _descriptor.Descriptor(
- name='StreamingOutputCallRequest',
- full_name='grpc.testing.StreamingOutputCallRequest',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='response_type', full_name='grpc.testing.StreamingOutputCallRequest.response_type', index=0,
- number=1, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- _descriptor.FieldDescriptor(
- name='response_parameters', full_name='grpc.testing.StreamingOutputCallRequest.response_parameters', index=1,
- number=2, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- _descriptor.FieldDescriptor(
- name='payload', full_name='grpc.testing.StreamingOutputCallRequest.payload', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- options=None,
- is_extendable=False,
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=582,
- serialized_end=763,
-)
-
-
-_STREAMINGOUTPUTCALLRESPONSE = _descriptor.Descriptor(
- name='StreamingOutputCallResponse',
- full_name='grpc.testing.StreamingOutputCallResponse',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='payload', full_name='grpc.testing.StreamingOutputCallResponse.payload', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- options=None),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- options=None,
- is_extendable=False,
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=765,
- serialized_end=834,
-)
-
-_PAYLOAD.fields_by_name['type'].enum_type = _PAYLOADTYPE
-_SIMPLEREQUEST.fields_by_name['response_type'].enum_type = _PAYLOADTYPE
-_SIMPLEREQUEST.fields_by_name['payload'].message_type = _PAYLOAD
-_SIMPLERESPONSE.fields_by_name['payload'].message_type = _PAYLOAD
-_STREAMINGINPUTCALLREQUEST.fields_by_name['payload'].message_type = _PAYLOAD
-_STREAMINGOUTPUTCALLREQUEST.fields_by_name['response_type'].enum_type = _PAYLOADTYPE
-_STREAMINGOUTPUTCALLREQUEST.fields_by_name['response_parameters'].message_type = _RESPONSEPARAMETERS
-_STREAMINGOUTPUTCALLREQUEST.fields_by_name['payload'].message_type = _PAYLOAD
-_STREAMINGOUTPUTCALLRESPONSE.fields_by_name['payload'].message_type = _PAYLOAD
-DESCRIPTOR.message_types_by_name['Payload'] = _PAYLOAD
-DESCRIPTOR.message_types_by_name['SimpleRequest'] = _SIMPLEREQUEST
-DESCRIPTOR.message_types_by_name['SimpleResponse'] = _SIMPLERESPONSE
-DESCRIPTOR.message_types_by_name['StreamingInputCallRequest'] = _STREAMINGINPUTCALLREQUEST
-DESCRIPTOR.message_types_by_name['StreamingInputCallResponse'] = _STREAMINGINPUTCALLRESPONSE
-DESCRIPTOR.message_types_by_name['ResponseParameters'] = _RESPONSEPARAMETERS
-DESCRIPTOR.message_types_by_name['StreamingOutputCallRequest'] = _STREAMINGOUTPUTCALLREQUEST
-DESCRIPTOR.message_types_by_name['StreamingOutputCallResponse'] = _STREAMINGOUTPUTCALLRESPONSE
-DESCRIPTOR.enum_types_by_name['PayloadType'] = _PAYLOADTYPE
-
-Payload = _reflection.GeneratedProtocolMessageType('Payload', (_message.Message,), dict(
- DESCRIPTOR = _PAYLOAD,
- __module__ = 'test.cpp.interop.messages_pb2'
- # @@protoc_insertion_point(class_scope:grpc.testing.Payload)
- ))
-_sym_db.RegisterMessage(Payload)
-
-SimpleRequest = _reflection.GeneratedProtocolMessageType('SimpleRequest', (_message.Message,), dict(
- DESCRIPTOR = _SIMPLEREQUEST,
- __module__ = 'test.cpp.interop.messages_pb2'
- # @@protoc_insertion_point(class_scope:grpc.testing.SimpleRequest)
- ))
-_sym_db.RegisterMessage(SimpleRequest)
-
-SimpleResponse = _reflection.GeneratedProtocolMessageType('SimpleResponse', (_message.Message,), dict(
- DESCRIPTOR = _SIMPLERESPONSE,
- __module__ = 'test.cpp.interop.messages_pb2'
- # @@protoc_insertion_point(class_scope:grpc.testing.SimpleResponse)
- ))
-_sym_db.RegisterMessage(SimpleResponse)
-
-StreamingInputCallRequest = _reflection.GeneratedProtocolMessageType('StreamingInputCallRequest', (_message.Message,), dict(
- DESCRIPTOR = _STREAMINGINPUTCALLREQUEST,
- __module__ = 'test.cpp.interop.messages_pb2'
- # @@protoc_insertion_point(class_scope:grpc.testing.StreamingInputCallRequest)
- ))
-_sym_db.RegisterMessage(StreamingInputCallRequest)
-
-StreamingInputCallResponse = _reflection.GeneratedProtocolMessageType('StreamingInputCallResponse', (_message.Message,), dict(
- DESCRIPTOR = _STREAMINGINPUTCALLRESPONSE,
- __module__ = 'test.cpp.interop.messages_pb2'
- # @@protoc_insertion_point(class_scope:grpc.testing.StreamingInputCallResponse)
- ))
-_sym_db.RegisterMessage(StreamingInputCallResponse)
-
-ResponseParameters = _reflection.GeneratedProtocolMessageType('ResponseParameters', (_message.Message,), dict(
- DESCRIPTOR = _RESPONSEPARAMETERS,
- __module__ = 'test.cpp.interop.messages_pb2'
- # @@protoc_insertion_point(class_scope:grpc.testing.ResponseParameters)
- ))
-_sym_db.RegisterMessage(ResponseParameters)
-
-StreamingOutputCallRequest = _reflection.GeneratedProtocolMessageType('StreamingOutputCallRequest', (_message.Message,), dict(
- DESCRIPTOR = _STREAMINGOUTPUTCALLREQUEST,
- __module__ = 'test.cpp.interop.messages_pb2'
- # @@protoc_insertion_point(class_scope:grpc.testing.StreamingOutputCallRequest)
- ))
-_sym_db.RegisterMessage(StreamingOutputCallRequest)
-
-StreamingOutputCallResponse = _reflection.GeneratedProtocolMessageType('StreamingOutputCallResponse', (_message.Message,), dict(
- DESCRIPTOR = _STREAMINGOUTPUTCALLRESPONSE,
- __module__ = 'test.cpp.interop.messages_pb2'
- # @@protoc_insertion_point(class_scope:grpc.testing.StreamingOutputCallResponse)
- ))
-_sym_db.RegisterMessage(StreamingOutputCallResponse)
-
-
-import abc
-from grpc.early_adopter import implementations
-from grpc.framework.alpha import utilities
-# @@protoc_insertion_point(module_scope)
diff --git a/src/python/grpcio_test/grpc_interop/methods.py b/src/python/grpcio_test/grpc_interop/methods.py
index 8ab5bac..3ef8545 100644
--- a/src/python/grpcio_test/grpc_interop/methods.py
+++ b/src/python/grpcio_test/grpc_interop/methods.py
@@ -37,123 +37,53 @@
from oauth2client import client as oauth2client_client
-from grpc.framework.alpha import utilities
-from grpc.framework.alpha import exceptions
+from grpc.framework.common import cardinality
+from grpc.framework.interfaces.face import face
from grpc_interop import empty_pb2
from grpc_interop import messages_pb2
+from grpc_interop import test_pb2
_TIMEOUT = 7
-def _empty_call(request, unused_context):
- return empty_pb2.Empty()
+class TestService(test_pb2.BetaTestServiceServicer):
-_CLIENT_EMPTY_CALL = utilities.unary_unary_invocation_description(
- empty_pb2.Empty.SerializeToString, empty_pb2.Empty.FromString)
-_SERVER_EMPTY_CALL = utilities.unary_unary_service_description(
- _empty_call, empty_pb2.Empty.FromString,
- empty_pb2.Empty.SerializeToString)
+ def EmptyCall(self, request, context):
+ return empty_pb2.Empty()
-
-def _unary_call(request, unused_context):
- return messages_pb2.SimpleResponse(
- payload=messages_pb2.Payload(
- type=messages_pb2.COMPRESSABLE,
- body=b'\x00' * request.response_size))
-
-_CLIENT_UNARY_CALL = utilities.unary_unary_invocation_description(
- messages_pb2.SimpleRequest.SerializeToString,
- messages_pb2.SimpleResponse.FromString)
-_SERVER_UNARY_CALL = utilities.unary_unary_service_description(
- _unary_call, messages_pb2.SimpleRequest.FromString,
- messages_pb2.SimpleResponse.SerializeToString)
-
-
-def _streaming_output_call(request, unused_context):
- for response_parameters in request.response_parameters:
- yield messages_pb2.StreamingOutputCallResponse(
+ def UnaryCall(self, request, context):
+ return messages_pb2.SimpleResponse(
payload=messages_pb2.Payload(
- type=request.response_type,
- body=b'\x00' * response_parameters.size))
+ type=messages_pb2.COMPRESSABLE,
+ body=b'\x00' * request.response_size))
-_CLIENT_STREAMING_OUTPUT_CALL = utilities.unary_stream_invocation_description(
- messages_pb2.StreamingOutputCallRequest.SerializeToString,
- messages_pb2.StreamingOutputCallResponse.FromString)
-_SERVER_STREAMING_OUTPUT_CALL = utilities.unary_stream_service_description(
- _streaming_output_call,
- messages_pb2.StreamingOutputCallRequest.FromString,
- messages_pb2.StreamingOutputCallResponse.SerializeToString)
+ def StreamingOutputCall(self, request, context):
+ for response_parameters in request.response_parameters:
+ yield messages_pb2.StreamingOutputCallResponse(
+ payload=messages_pb2.Payload(
+ type=request.response_type,
+ body=b'\x00' * response_parameters.size))
+ def StreamingInputCall(self, request_iterator, context):
+ aggregate_size = 0
+ for request in request_iterator:
+ if request.payload and request.payload.body:
+ aggregate_size += len(request.payload.body)
+ return messages_pb2.StreamingInputCallResponse(
+ aggregated_payload_size=aggregate_size)
-def _streaming_input_call(request_iterator, unused_context):
- aggregate_size = 0
- for request in request_iterator:
- if request.payload and request.payload.body:
- aggregate_size += len(request.payload.body)
- return messages_pb2.StreamingInputCallResponse(
- aggregated_payload_size=aggregate_size)
+ def FullDuplexCall(self, request_iterator, context):
+ for request in request_iterator:
+ yield messages_pb2.StreamingOutputCallResponse(
+ payload=messages_pb2.Payload(
+ type=request.payload.type,
+ body=b'\x00' * request.response_parameters[0].size))
-_CLIENT_STREAMING_INPUT_CALL = utilities.stream_unary_invocation_description(
- messages_pb2.StreamingInputCallRequest.SerializeToString,
- messages_pb2.StreamingInputCallResponse.FromString)
-_SERVER_STREAMING_INPUT_CALL = utilities.stream_unary_service_description(
- _streaming_input_call,
- messages_pb2.StreamingInputCallRequest.FromString,
- messages_pb2.StreamingInputCallResponse.SerializeToString)
-
-
-def _full_duplex_call(request_iterator, unused_context):
- for request in request_iterator:
- yield messages_pb2.StreamingOutputCallResponse(
- payload=messages_pb2.Payload(
- type=request.payload.type,
- body=b'\x00' * request.response_parameters[0].size))
-
-_CLIENT_FULL_DUPLEX_CALL = utilities.stream_stream_invocation_description(
- messages_pb2.StreamingOutputCallRequest.SerializeToString,
- messages_pb2.StreamingOutputCallResponse.FromString)
-_SERVER_FULL_DUPLEX_CALL = utilities.stream_stream_service_description(
- _full_duplex_call,
- messages_pb2.StreamingOutputCallRequest.FromString,
- messages_pb2.StreamingOutputCallResponse.SerializeToString)
-
-# NOTE(nathaniel): Apparently this is the same as the full-duplex call?
-_CLIENT_HALF_DUPLEX_CALL = utilities.stream_stream_invocation_description(
- messages_pb2.StreamingOutputCallRequest.SerializeToString,
- messages_pb2.StreamingOutputCallResponse.FromString)
-_SERVER_HALF_DUPLEX_CALL = utilities.stream_stream_service_description(
- _full_duplex_call,
- messages_pb2.StreamingOutputCallRequest.FromString,
- messages_pb2.StreamingOutputCallResponse.SerializeToString)
-
-
-SERVICE_NAME = 'grpc.testing.TestService'
-
-_EMPTY_CALL_METHOD_NAME = 'EmptyCall'
-_UNARY_CALL_METHOD_NAME = 'UnaryCall'
-_STREAMING_OUTPUT_CALL_METHOD_NAME = 'StreamingOutputCall'
-_STREAMING_INPUT_CALL_METHOD_NAME = 'StreamingInputCall'
-_FULL_DUPLEX_CALL_METHOD_NAME = 'FullDuplexCall'
-_HALF_DUPLEX_CALL_METHOD_NAME = 'HalfDuplexCall'
-
-CLIENT_METHODS = {
- _EMPTY_CALL_METHOD_NAME: _CLIENT_EMPTY_CALL,
- _UNARY_CALL_METHOD_NAME: _CLIENT_UNARY_CALL,
- _STREAMING_OUTPUT_CALL_METHOD_NAME: _CLIENT_STREAMING_OUTPUT_CALL,
- _STREAMING_INPUT_CALL_METHOD_NAME: _CLIENT_STREAMING_INPUT_CALL,
- _FULL_DUPLEX_CALL_METHOD_NAME: _CLIENT_FULL_DUPLEX_CALL,
- _HALF_DUPLEX_CALL_METHOD_NAME: _CLIENT_HALF_DUPLEX_CALL,
-}
-
-SERVER_METHODS = {
- _EMPTY_CALL_METHOD_NAME: _SERVER_EMPTY_CALL,
- _UNARY_CALL_METHOD_NAME: _SERVER_UNARY_CALL,
- _STREAMING_OUTPUT_CALL_METHOD_NAME: _SERVER_STREAMING_OUTPUT_CALL,
- _STREAMING_INPUT_CALL_METHOD_NAME: _SERVER_STREAMING_INPUT_CALL,
- _FULL_DUPLEX_CALL_METHOD_NAME: _SERVER_FULL_DUPLEX_CALL,
- _HALF_DUPLEX_CALL_METHOD_NAME: _SERVER_HALF_DUPLEX_CALL,
-}
+ # NOTE(nathaniel): Apparently this is the same as the full-duplex call?
+ # NOTE(atash): It isn't even called in the interop spec (Oct 22 2015)...
+ def HalfDuplexCall(self, request_iterator, context):
+ return self.FullDuplexCall(request_iterator, context)
def _large_unary_common_behavior(stub, fill_username, fill_oauth_scope):
@@ -162,7 +92,7 @@
response_type=messages_pb2.COMPRESSABLE, response_size=314159,
payload=messages_pb2.Payload(body=b'\x00' * 271828),
fill_username=fill_username, fill_oauth_scope=fill_oauth_scope)
- response_future = stub.UnaryCall.async(request, _TIMEOUT)
+ response_future = stub.UnaryCall.future(request, _TIMEOUT)
response = response_future.result()
if response.payload.type is not messages_pb2.COMPRESSABLE:
raise ValueError(
@@ -227,7 +157,7 @@
payloads = [messages_pb2.Payload(body=b'\x00' * size) for size in sizes]
requests = [messages_pb2.StreamingInputCallRequest(payload=payload)
for payload in payloads]
- responses = stub.StreamingInputCall.async(requests, _TIMEOUT)
+ responses = stub.StreamingInputCall.future(requests, _TIMEOUT)
responses.cancel()
if not responses.cancelled():
raise ValueError('expected call to be cancelled')
@@ -332,7 +262,7 @@
time.sleep(0.1)
try:
next(response_iterator)
- except exceptions.ExpirationError:
+ except face.ExpirationError:
pass
else:
raise ValueError('expected call to exceed deadline')
diff --git a/src/python/grpcio_test/grpc_interop/server.py b/src/python/grpcio_test/grpc_interop/server.py
index d4c1b4d..b541087 100644
--- a/src/python/grpcio_test/grpc_interop/server.py
+++ b/src/python/grpcio_test/grpc_interop/server.py
@@ -33,10 +33,11 @@
import logging
import time
-from grpc.early_adopter import implementations
+from grpc.beta import implementations
from grpc_interop import methods
from grpc_interop import resources
+from grpc_interop import test_pb2
_ONE_DAY_IN_SECONDS = 60 * 60 * 24
@@ -50,15 +51,15 @@
default=False, type=resources.parse_bool)
args = parser.parse_args()
+ server = test_pb2.beta_create_TestService_server(methods.TestService())
if args.use_tls:
private_key = resources.private_key()
certificate_chain = resources.certificate_chain()
- server = implementations.server(
- methods.SERVICE_NAME, methods.SERVER_METHODS, args.port,
- private_key=private_key, certificate_chain=certificate_chain)
+ credentials = implementations.ssl_server_credentials(
+ [(private_key, certificate_chain)])
+ server.add_secure_port('[::]:{}'.format(args.port), credentials)
else:
- server = implementations.server(
- methods.SERVICE_NAME, methods.SERVER_METHODS, args.port)
+ server.add_insecure_port('[::]:{}'.format(args.port))
server.start()
logging.info('Server serving.')
diff --git a/src/python/grpcio_test/grpc_interop/test.proto b/src/python/grpcio_test/grpc_interop/test.proto
new file mode 100644
index 0000000..b499813
--- /dev/null
+++ b/src/python/grpcio_test/grpc_interop/test.proto
@@ -0,0 +1,86 @@
+
+// Copyright 2015, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// An integration test service that covers all the method signature permutations
+// of unary/streaming requests/responses.
+
+syntax = "proto3";
+
+import "grpc_interop/empty.proto";
+import "grpc_interop/messages.proto";
+
+package grpc.testing;
+
+// A simple service to test the various types of RPCs and experiment with
+// performance with various types of payload.
+service TestService {
+ // One empty request followed by one empty response.
+ rpc EmptyCall(grpc.testing.Empty) returns (grpc.testing.Empty);
+
+ // One request followed by one response.
+ rpc UnaryCall(SimpleRequest) returns (SimpleResponse);
+
+ // One request followed by a sequence of responses (streamed download).
+ // The server returns the payload with client desired type and sizes.
+ rpc StreamingOutputCall(StreamingOutputCallRequest)
+ returns (stream StreamingOutputCallResponse);
+
+ // A sequence of requests followed by one response (streamed upload).
+ // The server returns the aggregated size of client payload as the result.
+ rpc StreamingInputCall(stream StreamingInputCallRequest)
+ returns (StreamingInputCallResponse);
+
+ // A sequence of requests with each request served by the server immediately.
+ // As one request could lead to multiple responses, this interface
+ // demonstrates the idea of full duplexing.
+ rpc FullDuplexCall(stream StreamingOutputCallRequest)
+ returns (stream StreamingOutputCallResponse);
+
+ // A sequence of requests followed by a sequence of responses.
+ // The server buffers all the client requests and then serves them in order. A
+ // stream of responses are returned to the client when the server starts with
+ // first request.
+ rpc HalfDuplexCall(stream StreamingOutputCallRequest)
+ returns (stream StreamingOutputCallResponse);
+}
+
+
+// A simple service NOT implemented at servers so clients can test for
+// that case.
+service UnimplementedService {
+ // A call that no server should implement
+ rpc UnimplementedCall(grpc.testing.Empty) returns(grpc.testing.Empty);
+}
+
+// A service used to control reconnect server.
+service ReconnectService {
+ rpc Start(grpc.testing.Empty) returns (grpc.testing.Empty);
+ rpc Stop(grpc.testing.Empty) returns (grpc.testing.ReconnectInfo);
+}
diff --git a/src/python/grpcio_test/grpc_interop/test_pb2.py b/src/python/grpcio_test/grpc_interop/test_pb2.py
deleted file mode 100644
index 71325d5..0000000
--- a/src/python/grpcio_test/grpc_interop/test_pb2.py
+++ /dev/null
@@ -1,178 +0,0 @@
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: test/cpp/interop/test.proto
-
-import sys
-_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-from google.protobuf import descriptor_pb2
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-from test.cpp.interop import empty_pb2 as test_dot_cpp_dot_interop_dot_empty__pb2
-from test.cpp.interop import messages_pb2 as test_dot_cpp_dot_interop_dot_messages__pb2
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
- name='test/cpp/interop/test.proto',
- package='grpc.testing',
- serialized_pb=_b('\n\x1btest/cpp/interop/test.proto\x12\x0cgrpc.testing\x1a\x1ctest/cpp/interop/empty.proto\x1a\x1ftest/cpp/interop/messages.proto2\xbb\x04\n\x0bTestService\x12\x35\n\tEmptyCall\x12\x13.grpc.testing.Empty\x1a\x13.grpc.testing.Empty\x12\x46\n\tUnaryCall\x12\x1b.grpc.testing.SimpleRequest\x1a\x1c.grpc.testing.SimpleResponse\x12l\n\x13StreamingOutputCall\x12(.grpc.testing.StreamingOutputCallRequest\x1a).grpc.testing.StreamingOutputCallResponse0\x01\x12i\n\x12StreamingInputCall\x12\'.grpc.testing.StreamingInputCallRequest\x1a(.grpc.testing.StreamingInputCallResponse(\x01\x12i\n\x0e\x46ullDuplexCall\x12(.grpc.testing.StreamingOutputCallRequest\x1a).grpc.testing.StreamingOutputCallResponse(\x01\x30\x01\x12i\n\x0eHalfDuplexCall\x12(.grpc.testing.StreamingOutputCallRequest\x1a).grpc.testing.StreamingOutputCallResponse(\x01\x30\x01')
- ,
- dependencies=[test_dot_cpp_dot_interop_dot_empty__pb2.DESCRIPTOR,test_dot_cpp_dot_interop_dot_messages__pb2.DESCRIPTOR,])
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-
-
-
-
-import abc
-from grpc.early_adopter import implementations
-from grpc.framework.alpha import utilities
-class EarlyAdopterTestServiceServicer(object):
- """<fill me in later!>"""
- __metaclass__ = abc.ABCMeta
- @abc.abstractmethod
- def EmptyCall(self, request, context):
- raise NotImplementedError()
- @abc.abstractmethod
- def UnaryCall(self, request, context):
- raise NotImplementedError()
- @abc.abstractmethod
- def StreamingOutputCall(self, request, context):
- raise NotImplementedError()
- @abc.abstractmethod
- def StreamingInputCall(self, request_iterator, context):
- raise NotImplementedError()
- @abc.abstractmethod
- def FullDuplexCall(self, request_iterator, context):
- raise NotImplementedError()
- @abc.abstractmethod
- def HalfDuplexCall(self, request_iterator, context):
- raise NotImplementedError()
-class EarlyAdopterTestServiceServer(object):
- """<fill me in later!>"""
- __metaclass__ = abc.ABCMeta
- @abc.abstractmethod
- def start(self):
- raise NotImplementedError()
- @abc.abstractmethod
- def stop(self):
- raise NotImplementedError()
-class EarlyAdopterTestServiceStub(object):
- """<fill me in later!>"""
- __metaclass__ = abc.ABCMeta
- @abc.abstractmethod
- def EmptyCall(self, request):
- raise NotImplementedError()
- EmptyCall.async = None
- @abc.abstractmethod
- def UnaryCall(self, request):
- raise NotImplementedError()
- UnaryCall.async = None
- @abc.abstractmethod
- def StreamingOutputCall(self, request):
- raise NotImplementedError()
- StreamingOutputCall.async = None
- @abc.abstractmethod
- def StreamingInputCall(self, request_iterator):
- raise NotImplementedError()
- StreamingInputCall.async = None
- @abc.abstractmethod
- def FullDuplexCall(self, request_iterator):
- raise NotImplementedError()
- FullDuplexCall.async = None
- @abc.abstractmethod
- def HalfDuplexCall(self, request_iterator):
- raise NotImplementedError()
- HalfDuplexCall.async = None
-def early_adopter_create_TestService_server(servicer, port, private_key=None, certificate_chain=None):
- import test.cpp.interop.empty_pb2
- import test.cpp.interop.empty_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- method_service_descriptions = {
- "EmptyCall": utilities.unary_unary_service_description(
- servicer.EmptyCall,
- test.cpp.interop.empty_pb2.Empty.FromString,
- test.cpp.interop.empty_pb2.Empty.SerializeToString,
- ),
- "FullDuplexCall": utilities.stream_stream_service_description(
- servicer.FullDuplexCall,
- test.cpp.interop.messages_pb2.StreamingOutputCallRequest.FromString,
- test.cpp.interop.messages_pb2.StreamingOutputCallResponse.SerializeToString,
- ),
- "HalfDuplexCall": utilities.stream_stream_service_description(
- servicer.HalfDuplexCall,
- test.cpp.interop.messages_pb2.StreamingOutputCallRequest.FromString,
- test.cpp.interop.messages_pb2.StreamingOutputCallResponse.SerializeToString,
- ),
- "StreamingInputCall": utilities.stream_unary_service_description(
- servicer.StreamingInputCall,
- test.cpp.interop.messages_pb2.StreamingInputCallRequest.FromString,
- test.cpp.interop.messages_pb2.StreamingInputCallResponse.SerializeToString,
- ),
- "StreamingOutputCall": utilities.unary_stream_service_description(
- servicer.StreamingOutputCall,
- test.cpp.interop.messages_pb2.StreamingOutputCallRequest.FromString,
- test.cpp.interop.messages_pb2.StreamingOutputCallResponse.SerializeToString,
- ),
- "UnaryCall": utilities.unary_unary_service_description(
- servicer.UnaryCall,
- test.cpp.interop.messages_pb2.SimpleRequest.FromString,
- test.cpp.interop.messages_pb2.SimpleResponse.SerializeToString,
- ),
- }
- return implementations.server("grpc.testing.TestService", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
-def early_adopter_create_TestService_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None):
- import test.cpp.interop.empty_pb2
- import test.cpp.interop.empty_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- import test.cpp.interop.messages_pb2
- method_invocation_descriptions = {
- "EmptyCall": utilities.unary_unary_invocation_description(
- test.cpp.interop.empty_pb2.Empty.SerializeToString,
- test.cpp.interop.empty_pb2.Empty.FromString,
- ),
- "FullDuplexCall": utilities.stream_stream_invocation_description(
- test.cpp.interop.messages_pb2.StreamingOutputCallRequest.SerializeToString,
- test.cpp.interop.messages_pb2.StreamingOutputCallResponse.FromString,
- ),
- "HalfDuplexCall": utilities.stream_stream_invocation_description(
- test.cpp.interop.messages_pb2.StreamingOutputCallRequest.SerializeToString,
- test.cpp.interop.messages_pb2.StreamingOutputCallResponse.FromString,
- ),
- "StreamingInputCall": utilities.stream_unary_invocation_description(
- test.cpp.interop.messages_pb2.StreamingInputCallRequest.SerializeToString,
- test.cpp.interop.messages_pb2.StreamingInputCallResponse.FromString,
- ),
- "StreamingOutputCall": utilities.unary_stream_invocation_description(
- test.cpp.interop.messages_pb2.StreamingOutputCallRequest.SerializeToString,
- test.cpp.interop.messages_pb2.StreamingOutputCallResponse.FromString,
- ),
- "UnaryCall": utilities.unary_unary_invocation_description(
- test.cpp.interop.messages_pb2.SimpleRequest.SerializeToString,
- test.cpp.interop.messages_pb2.SimpleResponse.FromString,
- ),
- }
- return implementations.stub("grpc.testing.TestService", method_invocation_descriptions, host, port, metadata_transformer=metadata_transformer, secure=secure, root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain, server_host_override=server_host_override)
-# @@protoc_insertion_point(module_scope)
diff --git a/src/python/grpcio_test/grpc_protoc_plugin/alpha_python_plugin_test.py b/src/python/grpcio_test/grpc_protoc_plugin/alpha_python_plugin_test.py
deleted file mode 100644
index b200d12..0000000
--- a/src/python/grpcio_test/grpc_protoc_plugin/alpha_python_plugin_test.py
+++ /dev/null
@@ -1,541 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import argparse
-import contextlib
-import distutils.spawn
-import errno
-import itertools
-import os
-import pkg_resources
-import shutil
-import subprocess
-import sys
-import tempfile
-import threading
-import time
-import unittest
-
-from grpc.framework.alpha import exceptions
-from grpc.framework.foundation import future
-
-# Identifiers of entities we expect to find in the generated module.
-SERVICER_IDENTIFIER = 'EarlyAdopterTestServiceServicer'
-SERVER_IDENTIFIER = 'EarlyAdopterTestServiceServer'
-STUB_IDENTIFIER = 'EarlyAdopterTestServiceStub'
-SERVER_FACTORY_IDENTIFIER = 'early_adopter_create_TestService_server'
-STUB_FACTORY_IDENTIFIER = 'early_adopter_create_TestService_stub'
-
-# The timeout used in tests of RPCs that are supposed to expire.
-SHORT_TIMEOUT = 2
-# The timeout used in tests of RPCs that are not supposed to expire. The
-# absurdly large value doesn't matter since no passing execution of this test
-# module will ever wait the duration.
-LONG_TIMEOUT = 600
-NO_DELAY = 0
-
-
-class _ServicerMethods(object):
-
- def __init__(self, test_pb2, delay):
- self._condition = threading.Condition()
- self._delay = delay
- self._paused = False
- self._fail = False
- self._test_pb2 = test_pb2
-
- @contextlib.contextmanager
- def pause(self): # pylint: disable=invalid-name
- with self._condition:
- self._paused = True
- yield
- with self._condition:
- self._paused = False
- self._condition.notify_all()
-
- @contextlib.contextmanager
- def fail(self): # pylint: disable=invalid-name
- with self._condition:
- self._fail = True
- yield
- with self._condition:
- self._fail = False
-
- def _control(self): # pylint: disable=invalid-name
- with self._condition:
- if self._fail:
- raise ValueError()
- while self._paused:
- self._condition.wait()
- time.sleep(self._delay)
-
- def UnaryCall(self, request, unused_rpc_context):
- response = self._test_pb2.SimpleResponse()
- response.payload.payload_type = self._test_pb2.COMPRESSABLE
- response.payload.payload_compressable = 'a' * request.response_size
- self._control()
- return response
-
- def StreamingOutputCall(self, request, unused_rpc_context):
- for parameter in request.response_parameters:
- response = self._test_pb2.StreamingOutputCallResponse()
- response.payload.payload_type = self._test_pb2.COMPRESSABLE
- response.payload.payload_compressable = 'a' * parameter.size
- self._control()
- yield response
-
- def StreamingInputCall(self, request_iter, unused_rpc_context):
- response = self._test_pb2.StreamingInputCallResponse()
- aggregated_payload_size = 0
- for request in request_iter:
- aggregated_payload_size += len(request.payload.payload_compressable)
- response.aggregated_payload_size = aggregated_payload_size
- self._control()
- return response
-
- def FullDuplexCall(self, request_iter, unused_rpc_context):
- for request in request_iter:
- for parameter in request.response_parameters:
- response = self._test_pb2.StreamingOutputCallResponse()
- response.payload.payload_type = self._test_pb2.COMPRESSABLE
- response.payload.payload_compressable = 'a' * parameter.size
- self._control()
- yield response
-
- def HalfDuplexCall(self, request_iter, unused_rpc_context):
- responses = []
- for request in request_iter:
- for parameter in request.response_parameters:
- response = self._test_pb2.StreamingOutputCallResponse()
- response.payload.payload_type = self._test_pb2.COMPRESSABLE
- response.payload.payload_compressable = 'a' * parameter.size
- self._control()
- responses.append(response)
- for response in responses:
- yield response
-
-
-@contextlib.contextmanager
-def _CreateService(test_pb2, delay):
- """Provides a servicer backend and a stub.
-
- The servicer is just the implementation
- of the actual servicer passed to the face player of the python RPC
- implementation; the two are detached.
-
- Non-zero delay puts a delay on each call to the servicer, representative of
- communication latency. Timeout is the default timeout for the stub while
- waiting for the service.
-
- Args:
- test_pb2: The test_pb2 module generated by this test.
- delay: Delay in seconds per response from the servicer.
-
- Yields:
- A (servicer_methods, servicer, stub) three-tuple where servicer_methods is
- the back-end of the service bound to the stub and the server and stub
- are both activated and ready for use.
- """
- servicer_methods = _ServicerMethods(test_pb2, delay)
-
- class Servicer(getattr(test_pb2, SERVICER_IDENTIFIER)):
-
- def UnaryCall(self, request, context):
- return servicer_methods.UnaryCall(request, context)
-
- def StreamingOutputCall(self, request, context):
- return servicer_methods.StreamingOutputCall(request, context)
-
- def StreamingInputCall(self, request_iter, context):
- return servicer_methods.StreamingInputCall(request_iter, context)
-
- def FullDuplexCall(self, request_iter, context):
- return servicer_methods.FullDuplexCall(request_iter, context)
-
- def HalfDuplexCall(self, request_iter, context):
- return servicer_methods.HalfDuplexCall(request_iter, context)
-
- servicer = Servicer()
- server = getattr(
- test_pb2, SERVER_FACTORY_IDENTIFIER)(servicer, 0)
- with server:
- port = server.port()
- stub = getattr(test_pb2, STUB_FACTORY_IDENTIFIER)('localhost', port)
- with stub:
- yield servicer_methods, stub, server
-
-
-def _streaming_input_request_iterator(test_pb2):
- for _ in range(3):
- request = test_pb2.StreamingInputCallRequest()
- request.payload.payload_type = test_pb2.COMPRESSABLE
- request.payload.payload_compressable = 'a'
- yield request
-
-
-def _streaming_output_request(test_pb2):
- request = test_pb2.StreamingOutputCallRequest()
- sizes = [1, 2, 3]
- request.response_parameters.add(size=sizes[0], interval_us=0)
- request.response_parameters.add(size=sizes[1], interval_us=0)
- request.response_parameters.add(size=sizes[2], interval_us=0)
- return request
-
-
-def _full_duplex_request_iterator(test_pb2):
- request = test_pb2.StreamingOutputCallRequest()
- request.response_parameters.add(size=1, interval_us=0)
- yield request
- request = test_pb2.StreamingOutputCallRequest()
- request.response_parameters.add(size=2, interval_us=0)
- request.response_parameters.add(size=3, interval_us=0)
- yield request
-
-
-class PythonPluginTest(unittest.TestCase):
- """Test case for the gRPC Python protoc-plugin.
-
- While reading these tests, remember that the futures API
- (`stub.method.async()`) only gives futures for the *non-streaming* responses,
- else it behaves like its blocking cousin.
- """
-
- def setUp(self):
- # Assume that the appropriate protoc and grpc_python_plugins are on the
- # path.
- protoc_command = 'protoc'
- protoc_plugin_filename = distutils.spawn.find_executable(
- 'grpc_python_plugin')
- test_proto_filename = pkg_resources.resource_filename(
- 'grpc_protoc_plugin', 'test.proto')
- if not os.path.isfile(protoc_command):
- # Assume that if we haven't built protoc that it's on the system.
- protoc_command = 'protoc'
-
- # Ensure that the output directory exists.
- self.outdir = tempfile.mkdtemp()
-
- # Invoke protoc with the plugin.
- cmd = [
- protoc_command,
- '--plugin=protoc-gen-python-grpc=%s' % protoc_plugin_filename,
- '-I .',
- '--python_out=%s' % self.outdir,
- '--python-grpc_out=%s' % self.outdir,
- os.path.basename(test_proto_filename),
- ]
- subprocess.check_call(' '.join(cmd), shell=True, env=os.environ,
- cwd=os.path.dirname(test_proto_filename))
- sys.path.append(self.outdir)
-
- def tearDown(self):
- try:
- shutil.rmtree(self.outdir)
- except OSError as exc:
- if exc.errno != errno.ENOENT:
- raise
-
- # TODO(atash): Figure out which of these tests is hanging flakily with small
- # probability.
-
- def testImportAttributes(self):
- # check that we can access the generated module and its members.
- import test_pb2 # pylint: disable=g-import-not-at-top
- self.assertIsNotNone(getattr(test_pb2, SERVICER_IDENTIFIER, None))
- self.assertIsNotNone(getattr(test_pb2, SERVER_IDENTIFIER, None))
- self.assertIsNotNone(getattr(test_pb2, STUB_IDENTIFIER, None))
- self.assertIsNotNone(getattr(test_pb2, SERVER_FACTORY_IDENTIFIER, None))
- self.assertIsNotNone(getattr(test_pb2, STUB_FACTORY_IDENTIFIER, None))
-
- def testUpDown(self):
- import test_pb2
- with _CreateService(
- test_pb2, NO_DELAY) as (servicer, stub, unused_server):
- request = test_pb2.SimpleRequest(response_size=13)
-
- def testUnaryCall(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (methods, stub, unused_server):
- timeout = 6 # TODO(issue 2039): LONG_TIMEOUT like the other methods.
- request = test_pb2.SimpleRequest(response_size=13)
- response = stub.UnaryCall(request, timeout)
- expected_response = methods.UnaryCall(request, 'not a real RpcContext!')
- self.assertEqual(expected_response, response)
-
- def testUnaryCallAsync(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request = test_pb2.SimpleRequest(response_size=13)
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- # Check that the call does not block waiting for the server to respond.
- with methods.pause():
- response_future = stub.UnaryCall.async(request, LONG_TIMEOUT)
- response = response_future.result()
- expected_response = methods.UnaryCall(request, 'not a real RpcContext!')
- self.assertEqual(expected_response, response)
-
- def testUnaryCallAsyncExpired(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- request = test_pb2.SimpleRequest(response_size=13)
- with methods.pause():
- response_future = stub.UnaryCall.async(request, SHORT_TIMEOUT)
- with self.assertRaises(exceptions.ExpirationError):
- response_future.result()
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this flakily hangs '
- 'forever and fix.')
- def testUnaryCallAsyncCancelled(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request = test_pb2.SimpleRequest(response_size=13)
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.pause():
- response_future = stub.UnaryCall.async(request, 1)
- response_future.cancel()
- self.assertTrue(response_future.cancelled())
-
- def testUnaryCallAsyncFailed(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request = test_pb2.SimpleRequest(response_size=13)
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.fail():
- response_future = stub.UnaryCall.async(request, LONG_TIMEOUT)
- self.assertIsNotNone(response_future.exception())
-
- def testStreamingOutputCall(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request = _streaming_output_request(test_pb2)
- with _CreateService(test_pb2, NO_DELAY) as (methods, stub, unused_server):
- responses = stub.StreamingOutputCall(request, LONG_TIMEOUT)
- expected_responses = methods.StreamingOutputCall(
- request, 'not a real RpcContext!')
- for expected_response, response in itertools.izip_longest(
- expected_responses, responses):
- self.assertEqual(expected_response, response)
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this flakily hangs '
- 'forever and fix.')
- def testStreamingOutputCallExpired(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request = _streaming_output_request(test_pb2)
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.pause():
- responses = stub.StreamingOutputCall(request, SHORT_TIMEOUT)
- with self.assertRaises(exceptions.ExpirationError):
- list(responses)
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this flakily hangs '
- 'forever and fix.')
- def testStreamingOutputCallCancelled(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request = _streaming_output_request(test_pb2)
- with _CreateService(test_pb2, NO_DELAY) as (
- unused_methods, stub, unused_server):
- responses = stub.StreamingOutputCall(request, SHORT_TIMEOUT)
- next(responses)
- responses.cancel()
- with self.assertRaises(future.CancelledError):
- next(responses)
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this times out '
- 'instead of raising the proper error.')
- def testStreamingOutputCallFailed(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request = _streaming_output_request(test_pb2)
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.fail():
- responses = stub.StreamingOutputCall(request, 1)
- self.assertIsNotNone(responses)
- with self.assertRaises(exceptions.ServicerError):
- next(responses)
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this flakily hangs '
- 'forever and fix.')
- def testStreamingInputCall(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (methods, stub, unused_server):
- response = stub.StreamingInputCall(
- _streaming_input_request_iterator(test_pb2), LONG_TIMEOUT)
- expected_response = methods.StreamingInputCall(
- _streaming_input_request_iterator(test_pb2), 'not a real RpcContext!')
- self.assertEqual(expected_response, response)
-
- def testStreamingInputCallAsync(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.pause():
- response_future = stub.StreamingInputCall.async(
- _streaming_input_request_iterator(test_pb2), LONG_TIMEOUT)
- response = response_future.result()
- expected_response = methods.StreamingInputCall(
- _streaming_input_request_iterator(test_pb2), 'not a real RpcContext!')
- self.assertEqual(expected_response, response)
-
- def testStreamingInputCallAsyncExpired(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.pause():
- response_future = stub.StreamingInputCall.async(
- _streaming_input_request_iterator(test_pb2), SHORT_TIMEOUT)
- with self.assertRaises(exceptions.ExpirationError):
- response_future.result()
- self.assertIsInstance(
- response_future.exception(), exceptions.ExpirationError)
-
- def testStreamingInputCallAsyncCancelled(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.pause():
- timeout = 6 # TODO(issue 2039): LONG_TIMEOUT like the other methods.
- response_future = stub.StreamingInputCall.async(
- _streaming_input_request_iterator(test_pb2), timeout)
- response_future.cancel()
- self.assertTrue(response_future.cancelled())
- with self.assertRaises(future.CancelledError):
- response_future.result()
-
- def testStreamingInputCallAsyncFailed(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.fail():
- response_future = stub.StreamingInputCall.async(
- _streaming_input_request_iterator(test_pb2), SHORT_TIMEOUT)
- self.assertIsNotNone(response_future.exception())
-
- def testFullDuplexCall(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (methods, stub, unused_server):
- responses = stub.FullDuplexCall(
- _full_duplex_request_iterator(test_pb2), LONG_TIMEOUT)
- expected_responses = methods.FullDuplexCall(
- _full_duplex_request_iterator(test_pb2), 'not a real RpcContext!')
- for expected_response, response in itertools.izip_longest(
- expected_responses, responses):
- self.assertEqual(expected_response, response)
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this flakily hangs '
- 'forever and fix.')
- def testFullDuplexCallExpired(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request_iterator = _full_duplex_request_iterator(test_pb2)
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.pause():
- responses = stub.FullDuplexCall(request_iterator, SHORT_TIMEOUT)
- with self.assertRaises(exceptions.ExpirationError):
- list(responses)
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this flakily hangs '
- 'forever and fix.')
- def testFullDuplexCallCancelled(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (methods, stub, unused_server):
- request_iterator = _full_duplex_request_iterator(test_pb2)
- responses = stub.FullDuplexCall(request_iterator, LONG_TIMEOUT)
- next(responses)
- responses.cancel()
- with self.assertRaises(future.CancelledError):
- next(responses)
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this hangs forever '
- 'and fix.')
- def testFullDuplexCallFailed(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request_iterator = _full_duplex_request_iterator(test_pb2)
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.fail():
- responses = stub.FullDuplexCall(request_iterator, LONG_TIMEOUT)
- self.assertIsNotNone(responses)
- with self.assertRaises(exceptions.ServicerError):
- next(responses)
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this flakily hangs '
- 'forever and fix.')
- def testHalfDuplexCall(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- def half_duplex_request_iterator():
- request = test_pb2.StreamingOutputCallRequest()
- request.response_parameters.add(size=1, interval_us=0)
- yield request
- request = test_pb2.StreamingOutputCallRequest()
- request.response_parameters.add(size=2, interval_us=0)
- request.response_parameters.add(size=3, interval_us=0)
- yield request
- responses = stub.HalfDuplexCall(
- half_duplex_request_iterator(), LONG_TIMEOUT)
- expected_responses = methods.HalfDuplexCall(
- half_duplex_request_iterator(), 'not a real RpcContext!')
- for check in itertools.izip_longest(expected_responses, responses):
- expected_response, response = check
- self.assertEqual(expected_response, response)
-
- def testHalfDuplexCallWedged(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- condition = threading.Condition()
- wait_cell = [False]
- @contextlib.contextmanager
- def wait(): # pylint: disable=invalid-name
- # Where's Python 3's 'nonlocal' statement when you need it?
- with condition:
- wait_cell[0] = True
- yield
- with condition:
- wait_cell[0] = False
- condition.notify_all()
- def half_duplex_request_iterator():
- request = test_pb2.StreamingOutputCallRequest()
- request.response_parameters.add(size=1, interval_us=0)
- yield request
- with condition:
- while wait_cell[0]:
- condition.wait()
- with _CreateService(test_pb2, NO_DELAY) as (methods, stub, unused_server):
- with wait():
- responses = stub.HalfDuplexCall(
- half_duplex_request_iterator(), SHORT_TIMEOUT)
- # half-duplex waits for the client to send all info
- with self.assertRaises(exceptions.ExpirationError):
- next(responses)
-
-
-if __name__ == '__main__':
- os.chdir(os.path.dirname(sys.argv[0]))
- unittest.main(verbosity=2)
diff --git a/src/python/grpcio_test/grpc_protoc_plugin/python_plugin_test.py b/src/python/grpcio_test/grpc_protoc_plugin/python_plugin_test.py
deleted file mode 100644
index b200d12..0000000
--- a/src/python/grpcio_test/grpc_protoc_plugin/python_plugin_test.py
+++ /dev/null
@@ -1,541 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import argparse
-import contextlib
-import distutils.spawn
-import errno
-import itertools
-import os
-import pkg_resources
-import shutil
-import subprocess
-import sys
-import tempfile
-import threading
-import time
-import unittest
-
-from grpc.framework.alpha import exceptions
-from grpc.framework.foundation import future
-
-# Identifiers of entities we expect to find in the generated module.
-SERVICER_IDENTIFIER = 'EarlyAdopterTestServiceServicer'
-SERVER_IDENTIFIER = 'EarlyAdopterTestServiceServer'
-STUB_IDENTIFIER = 'EarlyAdopterTestServiceStub'
-SERVER_FACTORY_IDENTIFIER = 'early_adopter_create_TestService_server'
-STUB_FACTORY_IDENTIFIER = 'early_adopter_create_TestService_stub'
-
-# The timeout used in tests of RPCs that are supposed to expire.
-SHORT_TIMEOUT = 2
-# The timeout used in tests of RPCs that are not supposed to expire. The
-# absurdly large value doesn't matter since no passing execution of this test
-# module will ever wait the duration.
-LONG_TIMEOUT = 600
-NO_DELAY = 0
-
-
-class _ServicerMethods(object):
-
- def __init__(self, test_pb2, delay):
- self._condition = threading.Condition()
- self._delay = delay
- self._paused = False
- self._fail = False
- self._test_pb2 = test_pb2
-
- @contextlib.contextmanager
- def pause(self): # pylint: disable=invalid-name
- with self._condition:
- self._paused = True
- yield
- with self._condition:
- self._paused = False
- self._condition.notify_all()
-
- @contextlib.contextmanager
- def fail(self): # pylint: disable=invalid-name
- with self._condition:
- self._fail = True
- yield
- with self._condition:
- self._fail = False
-
- def _control(self): # pylint: disable=invalid-name
- with self._condition:
- if self._fail:
- raise ValueError()
- while self._paused:
- self._condition.wait()
- time.sleep(self._delay)
-
- def UnaryCall(self, request, unused_rpc_context):
- response = self._test_pb2.SimpleResponse()
- response.payload.payload_type = self._test_pb2.COMPRESSABLE
- response.payload.payload_compressable = 'a' * request.response_size
- self._control()
- return response
-
- def StreamingOutputCall(self, request, unused_rpc_context):
- for parameter in request.response_parameters:
- response = self._test_pb2.StreamingOutputCallResponse()
- response.payload.payload_type = self._test_pb2.COMPRESSABLE
- response.payload.payload_compressable = 'a' * parameter.size
- self._control()
- yield response
-
- def StreamingInputCall(self, request_iter, unused_rpc_context):
- response = self._test_pb2.StreamingInputCallResponse()
- aggregated_payload_size = 0
- for request in request_iter:
- aggregated_payload_size += len(request.payload.payload_compressable)
- response.aggregated_payload_size = aggregated_payload_size
- self._control()
- return response
-
- def FullDuplexCall(self, request_iter, unused_rpc_context):
- for request in request_iter:
- for parameter in request.response_parameters:
- response = self._test_pb2.StreamingOutputCallResponse()
- response.payload.payload_type = self._test_pb2.COMPRESSABLE
- response.payload.payload_compressable = 'a' * parameter.size
- self._control()
- yield response
-
- def HalfDuplexCall(self, request_iter, unused_rpc_context):
- responses = []
- for request in request_iter:
- for parameter in request.response_parameters:
- response = self._test_pb2.StreamingOutputCallResponse()
- response.payload.payload_type = self._test_pb2.COMPRESSABLE
- response.payload.payload_compressable = 'a' * parameter.size
- self._control()
- responses.append(response)
- for response in responses:
- yield response
-
-
-@contextlib.contextmanager
-def _CreateService(test_pb2, delay):
- """Provides a servicer backend and a stub.
-
- The servicer is just the implementation
- of the actual servicer passed to the face player of the python RPC
- implementation; the two are detached.
-
- Non-zero delay puts a delay on each call to the servicer, representative of
- communication latency. Timeout is the default timeout for the stub while
- waiting for the service.
-
- Args:
- test_pb2: The test_pb2 module generated by this test.
- delay: Delay in seconds per response from the servicer.
-
- Yields:
- A (servicer_methods, servicer, stub) three-tuple where servicer_methods is
- the back-end of the service bound to the stub and the server and stub
- are both activated and ready for use.
- """
- servicer_methods = _ServicerMethods(test_pb2, delay)
-
- class Servicer(getattr(test_pb2, SERVICER_IDENTIFIER)):
-
- def UnaryCall(self, request, context):
- return servicer_methods.UnaryCall(request, context)
-
- def StreamingOutputCall(self, request, context):
- return servicer_methods.StreamingOutputCall(request, context)
-
- def StreamingInputCall(self, request_iter, context):
- return servicer_methods.StreamingInputCall(request_iter, context)
-
- def FullDuplexCall(self, request_iter, context):
- return servicer_methods.FullDuplexCall(request_iter, context)
-
- def HalfDuplexCall(self, request_iter, context):
- return servicer_methods.HalfDuplexCall(request_iter, context)
-
- servicer = Servicer()
- server = getattr(
- test_pb2, SERVER_FACTORY_IDENTIFIER)(servicer, 0)
- with server:
- port = server.port()
- stub = getattr(test_pb2, STUB_FACTORY_IDENTIFIER)('localhost', port)
- with stub:
- yield servicer_methods, stub, server
-
-
-def _streaming_input_request_iterator(test_pb2):
- for _ in range(3):
- request = test_pb2.StreamingInputCallRequest()
- request.payload.payload_type = test_pb2.COMPRESSABLE
- request.payload.payload_compressable = 'a'
- yield request
-
-
-def _streaming_output_request(test_pb2):
- request = test_pb2.StreamingOutputCallRequest()
- sizes = [1, 2, 3]
- request.response_parameters.add(size=sizes[0], interval_us=0)
- request.response_parameters.add(size=sizes[1], interval_us=0)
- request.response_parameters.add(size=sizes[2], interval_us=0)
- return request
-
-
-def _full_duplex_request_iterator(test_pb2):
- request = test_pb2.StreamingOutputCallRequest()
- request.response_parameters.add(size=1, interval_us=0)
- yield request
- request = test_pb2.StreamingOutputCallRequest()
- request.response_parameters.add(size=2, interval_us=0)
- request.response_parameters.add(size=3, interval_us=0)
- yield request
-
-
-class PythonPluginTest(unittest.TestCase):
- """Test case for the gRPC Python protoc-plugin.
-
- While reading these tests, remember that the futures API
- (`stub.method.async()`) only gives futures for the *non-streaming* responses,
- else it behaves like its blocking cousin.
- """
-
- def setUp(self):
- # Assume that the appropriate protoc and grpc_python_plugins are on the
- # path.
- protoc_command = 'protoc'
- protoc_plugin_filename = distutils.spawn.find_executable(
- 'grpc_python_plugin')
- test_proto_filename = pkg_resources.resource_filename(
- 'grpc_protoc_plugin', 'test.proto')
- if not os.path.isfile(protoc_command):
- # Assume that if we haven't built protoc that it's on the system.
- protoc_command = 'protoc'
-
- # Ensure that the output directory exists.
- self.outdir = tempfile.mkdtemp()
-
- # Invoke protoc with the plugin.
- cmd = [
- protoc_command,
- '--plugin=protoc-gen-python-grpc=%s' % protoc_plugin_filename,
- '-I .',
- '--python_out=%s' % self.outdir,
- '--python-grpc_out=%s' % self.outdir,
- os.path.basename(test_proto_filename),
- ]
- subprocess.check_call(' '.join(cmd), shell=True, env=os.environ,
- cwd=os.path.dirname(test_proto_filename))
- sys.path.append(self.outdir)
-
- def tearDown(self):
- try:
- shutil.rmtree(self.outdir)
- except OSError as exc:
- if exc.errno != errno.ENOENT:
- raise
-
- # TODO(atash): Figure out which of these tests is hanging flakily with small
- # probability.
-
- def testImportAttributes(self):
- # check that we can access the generated module and its members.
- import test_pb2 # pylint: disable=g-import-not-at-top
- self.assertIsNotNone(getattr(test_pb2, SERVICER_IDENTIFIER, None))
- self.assertIsNotNone(getattr(test_pb2, SERVER_IDENTIFIER, None))
- self.assertIsNotNone(getattr(test_pb2, STUB_IDENTIFIER, None))
- self.assertIsNotNone(getattr(test_pb2, SERVER_FACTORY_IDENTIFIER, None))
- self.assertIsNotNone(getattr(test_pb2, STUB_FACTORY_IDENTIFIER, None))
-
- def testUpDown(self):
- import test_pb2
- with _CreateService(
- test_pb2, NO_DELAY) as (servicer, stub, unused_server):
- request = test_pb2.SimpleRequest(response_size=13)
-
- def testUnaryCall(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (methods, stub, unused_server):
- timeout = 6 # TODO(issue 2039): LONG_TIMEOUT like the other methods.
- request = test_pb2.SimpleRequest(response_size=13)
- response = stub.UnaryCall(request, timeout)
- expected_response = methods.UnaryCall(request, 'not a real RpcContext!')
- self.assertEqual(expected_response, response)
-
- def testUnaryCallAsync(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request = test_pb2.SimpleRequest(response_size=13)
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- # Check that the call does not block waiting for the server to respond.
- with methods.pause():
- response_future = stub.UnaryCall.async(request, LONG_TIMEOUT)
- response = response_future.result()
- expected_response = methods.UnaryCall(request, 'not a real RpcContext!')
- self.assertEqual(expected_response, response)
-
- def testUnaryCallAsyncExpired(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- request = test_pb2.SimpleRequest(response_size=13)
- with methods.pause():
- response_future = stub.UnaryCall.async(request, SHORT_TIMEOUT)
- with self.assertRaises(exceptions.ExpirationError):
- response_future.result()
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this flakily hangs '
- 'forever and fix.')
- def testUnaryCallAsyncCancelled(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request = test_pb2.SimpleRequest(response_size=13)
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.pause():
- response_future = stub.UnaryCall.async(request, 1)
- response_future.cancel()
- self.assertTrue(response_future.cancelled())
-
- def testUnaryCallAsyncFailed(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request = test_pb2.SimpleRequest(response_size=13)
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.fail():
- response_future = stub.UnaryCall.async(request, LONG_TIMEOUT)
- self.assertIsNotNone(response_future.exception())
-
- def testStreamingOutputCall(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request = _streaming_output_request(test_pb2)
- with _CreateService(test_pb2, NO_DELAY) as (methods, stub, unused_server):
- responses = stub.StreamingOutputCall(request, LONG_TIMEOUT)
- expected_responses = methods.StreamingOutputCall(
- request, 'not a real RpcContext!')
- for expected_response, response in itertools.izip_longest(
- expected_responses, responses):
- self.assertEqual(expected_response, response)
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this flakily hangs '
- 'forever and fix.')
- def testStreamingOutputCallExpired(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request = _streaming_output_request(test_pb2)
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.pause():
- responses = stub.StreamingOutputCall(request, SHORT_TIMEOUT)
- with self.assertRaises(exceptions.ExpirationError):
- list(responses)
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this flakily hangs '
- 'forever and fix.')
- def testStreamingOutputCallCancelled(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request = _streaming_output_request(test_pb2)
- with _CreateService(test_pb2, NO_DELAY) as (
- unused_methods, stub, unused_server):
- responses = stub.StreamingOutputCall(request, SHORT_TIMEOUT)
- next(responses)
- responses.cancel()
- with self.assertRaises(future.CancelledError):
- next(responses)
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this times out '
- 'instead of raising the proper error.')
- def testStreamingOutputCallFailed(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request = _streaming_output_request(test_pb2)
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.fail():
- responses = stub.StreamingOutputCall(request, 1)
- self.assertIsNotNone(responses)
- with self.assertRaises(exceptions.ServicerError):
- next(responses)
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this flakily hangs '
- 'forever and fix.')
- def testStreamingInputCall(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (methods, stub, unused_server):
- response = stub.StreamingInputCall(
- _streaming_input_request_iterator(test_pb2), LONG_TIMEOUT)
- expected_response = methods.StreamingInputCall(
- _streaming_input_request_iterator(test_pb2), 'not a real RpcContext!')
- self.assertEqual(expected_response, response)
-
- def testStreamingInputCallAsync(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.pause():
- response_future = stub.StreamingInputCall.async(
- _streaming_input_request_iterator(test_pb2), LONG_TIMEOUT)
- response = response_future.result()
- expected_response = methods.StreamingInputCall(
- _streaming_input_request_iterator(test_pb2), 'not a real RpcContext!')
- self.assertEqual(expected_response, response)
-
- def testStreamingInputCallAsyncExpired(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.pause():
- response_future = stub.StreamingInputCall.async(
- _streaming_input_request_iterator(test_pb2), SHORT_TIMEOUT)
- with self.assertRaises(exceptions.ExpirationError):
- response_future.result()
- self.assertIsInstance(
- response_future.exception(), exceptions.ExpirationError)
-
- def testStreamingInputCallAsyncCancelled(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.pause():
- timeout = 6 # TODO(issue 2039): LONG_TIMEOUT like the other methods.
- response_future = stub.StreamingInputCall.async(
- _streaming_input_request_iterator(test_pb2), timeout)
- response_future.cancel()
- self.assertTrue(response_future.cancelled())
- with self.assertRaises(future.CancelledError):
- response_future.result()
-
- def testStreamingInputCallAsyncFailed(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.fail():
- response_future = stub.StreamingInputCall.async(
- _streaming_input_request_iterator(test_pb2), SHORT_TIMEOUT)
- self.assertIsNotNone(response_future.exception())
-
- def testFullDuplexCall(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (methods, stub, unused_server):
- responses = stub.FullDuplexCall(
- _full_duplex_request_iterator(test_pb2), LONG_TIMEOUT)
- expected_responses = methods.FullDuplexCall(
- _full_duplex_request_iterator(test_pb2), 'not a real RpcContext!')
- for expected_response, response in itertools.izip_longest(
- expected_responses, responses):
- self.assertEqual(expected_response, response)
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this flakily hangs '
- 'forever and fix.')
- def testFullDuplexCallExpired(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request_iterator = _full_duplex_request_iterator(test_pb2)
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.pause():
- responses = stub.FullDuplexCall(request_iterator, SHORT_TIMEOUT)
- with self.assertRaises(exceptions.ExpirationError):
- list(responses)
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this flakily hangs '
- 'forever and fix.')
- def testFullDuplexCallCancelled(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (methods, stub, unused_server):
- request_iterator = _full_duplex_request_iterator(test_pb2)
- responses = stub.FullDuplexCall(request_iterator, LONG_TIMEOUT)
- next(responses)
- responses.cancel()
- with self.assertRaises(future.CancelledError):
- next(responses)
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this hangs forever '
- 'and fix.')
- def testFullDuplexCallFailed(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- request_iterator = _full_duplex_request_iterator(test_pb2)
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- with methods.fail():
- responses = stub.FullDuplexCall(request_iterator, LONG_TIMEOUT)
- self.assertIsNotNone(responses)
- with self.assertRaises(exceptions.ServicerError):
- next(responses)
-
- @unittest.skip('TODO(atash,nathaniel): figure out why this flakily hangs '
- 'forever and fix.')
- def testHalfDuplexCall(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- with _CreateService(test_pb2, NO_DELAY) as (
- methods, stub, unused_server):
- def half_duplex_request_iterator():
- request = test_pb2.StreamingOutputCallRequest()
- request.response_parameters.add(size=1, interval_us=0)
- yield request
- request = test_pb2.StreamingOutputCallRequest()
- request.response_parameters.add(size=2, interval_us=0)
- request.response_parameters.add(size=3, interval_us=0)
- yield request
- responses = stub.HalfDuplexCall(
- half_duplex_request_iterator(), LONG_TIMEOUT)
- expected_responses = methods.HalfDuplexCall(
- half_duplex_request_iterator(), 'not a real RpcContext!')
- for check in itertools.izip_longest(expected_responses, responses):
- expected_response, response = check
- self.assertEqual(expected_response, response)
-
- def testHalfDuplexCallWedged(self):
- import test_pb2 # pylint: disable=g-import-not-at-top
- condition = threading.Condition()
- wait_cell = [False]
- @contextlib.contextmanager
- def wait(): # pylint: disable=invalid-name
- # Where's Python 3's 'nonlocal' statement when you need it?
- with condition:
- wait_cell[0] = True
- yield
- with condition:
- wait_cell[0] = False
- condition.notify_all()
- def half_duplex_request_iterator():
- request = test_pb2.StreamingOutputCallRequest()
- request.response_parameters.add(size=1, interval_us=0)
- yield request
- with condition:
- while wait_cell[0]:
- condition.wait()
- with _CreateService(test_pb2, NO_DELAY) as (methods, stub, unused_server):
- with wait():
- responses = stub.HalfDuplexCall(
- half_duplex_request_iterator(), SHORT_TIMEOUT)
- # half-duplex waits for the client to send all info
- with self.assertRaises(exceptions.ExpirationError):
- next(responses)
-
-
-if __name__ == '__main__':
- os.chdir(os.path.dirname(sys.argv[0]))
- unittest.main(verbosity=2)
diff --git a/src/python/grpcio_test/grpc_protoc_plugin/test.proto b/src/python/grpcio_test/grpc_protoc_plugin/test.proto
index ed7c6a7..6762a8e 100644
--- a/src/python/grpcio_test/grpc_protoc_plugin/test.proto
+++ b/src/python/grpcio_test/grpc_protoc_plugin/test.proto
@@ -32,7 +32,7 @@
// This file is duplicated around the code base. See GitHub issue #526.
syntax = "proto2";
-package grpc.testing;
+package grpc_protoc_plugin;
enum PayloadType {
// Compressable text format.
diff --git a/src/python/grpcio_test/grpc_test/_adapter/_blocking_invocation_inline_service_test.py b/src/python/grpcio_test/grpc_test/_adapter/_blocking_invocation_inline_service_test.py
deleted file mode 100644
index a1f7762..0000000
--- a/src/python/grpcio_test/grpc_test/_adapter/_blocking_invocation_inline_service_test.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""One of the tests of the Face layer of RPC Framework."""
-
-import unittest
-
-from grpc_test._adapter import _face_test_case
-from grpc_test.framework.face.testing import blocking_invocation_inline_service_test_case as test_case
-
-
-class BlockingInvocationInlineServiceTest(
- _face_test_case.FaceTestCase,
- test_case.BlockingInvocationInlineServiceTestCase,
- unittest.TestCase):
- pass
-
-
-if __name__ == '__main__':
- unittest.main(verbosity=2)
diff --git a/src/python/grpcio_test/grpc_test/_adapter/_event_invocation_synchronous_event_service_test.py b/src/python/grpcio_test/grpc_test/_adapter/_event_invocation_synchronous_event_service_test.py
deleted file mode 100644
index 0d01ebc..0000000
--- a/src/python/grpcio_test/grpc_test/_adapter/_event_invocation_synchronous_event_service_test.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""One of the tests of the Face layer of RPC Framework."""
-
-import unittest
-
-from grpc_test._adapter import _face_test_case
-from grpc_test.framework.face.testing import event_invocation_synchronous_event_service_test_case as test_case
-
-
-class EventInvocationSynchronousEventServiceTest(
- _face_test_case.FaceTestCase,
- test_case.EventInvocationSynchronousEventServiceTestCase,
- unittest.TestCase):
- pass
-
-
-if __name__ == '__main__':
- unittest.main(verbosity=2)
diff --git a/src/python/grpcio_test/grpc_test/_adapter/_face_test_case.py b/src/python/grpcio_test/grpc_test/_adapter/_face_test_case.py
deleted file mode 100644
index dfbd0b6..0000000
--- a/src/python/grpcio_test/grpc_test/_adapter/_face_test_case.py
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Common construction and destruction for GRPC-backed Face-layer tests."""
-
-import unittest
-
-from grpc._adapter import fore
-from grpc._adapter import rear
-from grpc.framework.base import util
-from grpc.framework.base import implementations as base_implementations
-from grpc.framework.face import implementations as face_implementations
-from grpc.framework.foundation import logging_pool
-from grpc_test.framework.face.testing import coverage
-from grpc_test.framework.face.testing import serial
-from grpc_test.framework.face.testing import test_case
-
-_TIMEOUT = 3
-_MAXIMUM_TIMEOUT = 90
-_MAXIMUM_POOL_SIZE = 4
-
-
-class FaceTestCase(test_case.FaceTestCase, coverage.BlockingCoverage):
- """Provides abstract Face-layer tests a GRPC-backed implementation."""
-
- def set_up_implementation(
- self, name, methods, method_implementations,
- multi_method_implementation):
- pool = logging_pool.pool(_MAXIMUM_POOL_SIZE)
-
- servicer = face_implementations.servicer(
- pool, method_implementations, multi_method_implementation)
-
- serialization = serial.serialization(methods)
-
- fore_link = fore.ForeLink(
- pool, serialization.request_deserializers,
- serialization.response_serializers, None, ())
- fore_link.start()
- port = fore_link.port()
- rear_link = rear.RearLink(
- 'localhost', port, pool,
- serialization.request_serializers,
- serialization.response_deserializers, False, None, None, None)
- rear_link.start()
- front = base_implementations.front_link(pool, pool, pool)
- back = base_implementations.back_link(
- servicer, pool, pool, pool, _TIMEOUT, _MAXIMUM_TIMEOUT)
- fore_link.join_rear_link(back)
- back.join_fore_link(fore_link)
- rear_link.join_fore_link(front)
- front.join_rear_link(rear_link)
-
- stub = face_implementations.generic_stub(front, pool)
- return stub, (rear_link, fore_link, front, back)
-
- def tear_down_implementation(self, memo):
- rear_link, fore_link, front, back = memo
- # TODO(nathaniel): Waiting for the front and back to idle possibly should
- # not be necessary - investigate as part of graceful shutdown work.
- util.wait_for_idle(front)
- util.wait_for_idle(back)
- rear_link.stop()
- fore_link.stop()
-
- @unittest.skip('Service-side failure not transmitted by GRPC.')
- def testFailedUnaryRequestUnaryResponse(self):
- raise NotImplementedError()
-
- @unittest.skip('Service-side failure not transmitted by GRPC.')
- def testFailedUnaryRequestStreamResponse(self):
- raise NotImplementedError()
-
- @unittest.skip('Service-side failure not transmitted by GRPC.')
- def testFailedStreamRequestUnaryResponse(self):
- raise NotImplementedError()
-
- @unittest.skip('Service-side failure not transmitted by GRPC.')
- def testFailedStreamRequestStreamResponse(self):
- raise NotImplementedError()
diff --git a/src/python/grpcio_test/grpc_test/_adapter/_future_invocation_asynchronous_event_service_test.py b/src/python/grpcio_test/grpc_test/_adapter/_future_invocation_asynchronous_event_service_test.py
deleted file mode 100644
index ea4a6a0..0000000
--- a/src/python/grpcio_test/grpc_test/_adapter/_future_invocation_asynchronous_event_service_test.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""One of the tests of the Face layer of RPC Framework."""
-
-import unittest
-
-from grpc_test._adapter import _face_test_case
-from grpc_test.framework.face.testing import future_invocation_asynchronous_event_service_test_case as test_case
-
-
-class FutureInvocationAsynchronousEventServiceTest(
- _face_test_case.FaceTestCase,
- test_case.FutureInvocationAsynchronousEventServiceTestCase,
- unittest.TestCase):
- pass
-
-
-if __name__ == '__main__':
- unittest.main(verbosity=2)
diff --git a/src/python/grpcio_test/grpc_test/_adapter/_links_test.py b/src/python/grpcio_test/grpc_test/_adapter/_links_test.py
deleted file mode 100644
index 4077b8e..0000000
--- a/src/python/grpcio_test/grpc_test/_adapter/_links_test.py
+++ /dev/null
@@ -1,277 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Test of the GRPC-backed ForeLink and RearLink."""
-
-import threading
-import unittest
-
-from grpc._adapter import fore
-from grpc._adapter import rear
-from grpc.framework.base import interfaces
-from grpc.framework.foundation import logging_pool
-from grpc_test._adapter import _proto_scenarios
-from grpc_test._adapter import _test_links
-
-_IDENTITY = lambda x: x
-_TIMEOUT = 32
-
-
-# TODO(nathaniel): End-to-end metadata testing.
-def _transform_metadata(unused_metadata):
- return (
- ('one_unused_key', 'one unused value'),
- ('another_unused_key', 'another unused value'),
-)
-
-
-class RoundTripTest(unittest.TestCase):
-
- def setUp(self):
- self.fore_link_pool = logging_pool.pool(8)
- self.rear_link_pool = logging_pool.pool(8)
-
- def tearDown(self):
- self.rear_link_pool.shutdown(wait=True)
- self.fore_link_pool.shutdown(wait=True)
-
- def testZeroMessageRoundTrip(self):
- test_operation_id = object()
- test_method = 'test method'
- test_fore_link = _test_links.ForeLink(None, None)
- def rear_action(front_to_back_ticket, fore_link):
- if front_to_back_ticket.kind in (
- interfaces.FrontToBackTicket.Kind.COMPLETION,
- interfaces.FrontToBackTicket.Kind.ENTIRE):
- back_to_front_ticket = interfaces.BackToFrontTicket(
- front_to_back_ticket.operation_id, 0,
- interfaces.BackToFrontTicket.Kind.COMPLETION, None)
- fore_link.accept_back_to_front_ticket(back_to_front_ticket)
- test_rear_link = _test_links.RearLink(rear_action, None)
-
- fore_link = fore.ForeLink(
- self.fore_link_pool, {test_method: None}, {test_method: None}, None, ())
- fore_link.join_rear_link(test_rear_link)
- test_rear_link.join_fore_link(fore_link)
- fore_link.start()
- port = fore_link.port()
-
- rear_link = rear.RearLink(
- 'localhost', port, self.rear_link_pool, {test_method: None},
- {test_method: None}, False, None, None, None,
- metadata_transformer=_transform_metadata)
- rear_link.join_fore_link(test_fore_link)
- test_fore_link.join_rear_link(rear_link)
- rear_link.start()
-
- front_to_back_ticket = interfaces.FrontToBackTicket(
- test_operation_id, 0, interfaces.FrontToBackTicket.Kind.ENTIRE,
- test_method, interfaces.ServicedSubscription.Kind.FULL, None, None,
- _TIMEOUT)
- rear_link.accept_front_to_back_ticket(front_to_back_ticket)
-
- with test_fore_link.condition:
- while (not test_fore_link.tickets or
- test_fore_link.tickets[-1].kind is
- interfaces.BackToFrontTicket.Kind.CONTINUATION):
- test_fore_link.condition.wait()
-
- rear_link.stop()
- fore_link.stop()
-
- with test_fore_link.condition:
- self.assertIs(
- test_fore_link.tickets[-1].kind,
- interfaces.BackToFrontTicket.Kind.COMPLETION)
-
- def testEntireRoundTrip(self):
- test_operation_id = object()
- test_method = 'test method'
- test_front_to_back_datum = b'\x07'
- test_back_to_front_datum = b'\x08'
- test_fore_link = _test_links.ForeLink(None, None)
- rear_sequence_number = [0]
- def rear_action(front_to_back_ticket, fore_link):
- if front_to_back_ticket.payload is None:
- payload = None
- else:
- payload = test_back_to_front_datum
- terminal = front_to_back_ticket.kind in (
- interfaces.FrontToBackTicket.Kind.COMPLETION,
- interfaces.FrontToBackTicket.Kind.ENTIRE)
- if payload is not None or terminal:
- if terminal:
- kind = interfaces.BackToFrontTicket.Kind.COMPLETION
- else:
- kind = interfaces.BackToFrontTicket.Kind.CONTINUATION
- back_to_front_ticket = interfaces.BackToFrontTicket(
- front_to_back_ticket.operation_id, rear_sequence_number[0], kind,
- payload)
- rear_sequence_number[0] += 1
- fore_link.accept_back_to_front_ticket(back_to_front_ticket)
- test_rear_link = _test_links.RearLink(rear_action, None)
-
- fore_link = fore.ForeLink(
- self.fore_link_pool, {test_method: _IDENTITY},
- {test_method: _IDENTITY}, None, ())
- fore_link.join_rear_link(test_rear_link)
- test_rear_link.join_fore_link(fore_link)
- fore_link.start()
- port = fore_link.port()
-
- rear_link = rear.RearLink(
- 'localhost', port, self.rear_link_pool, {test_method: _IDENTITY},
- {test_method: _IDENTITY}, False, None, None, None)
- rear_link.join_fore_link(test_fore_link)
- test_fore_link.join_rear_link(rear_link)
- rear_link.start()
-
- front_to_back_ticket = interfaces.FrontToBackTicket(
- test_operation_id, 0, interfaces.FrontToBackTicket.Kind.ENTIRE,
- test_method, interfaces.ServicedSubscription.Kind.FULL, None,
- test_front_to_back_datum, _TIMEOUT)
- rear_link.accept_front_to_back_ticket(front_to_back_ticket)
-
- with test_fore_link.condition:
- while (not test_fore_link.tickets or
- test_fore_link.tickets[-1].kind is not
- interfaces.BackToFrontTicket.Kind.COMPLETION):
- test_fore_link.condition.wait()
-
- rear_link.stop()
- fore_link.stop()
-
- with test_rear_link.condition:
- front_to_back_payloads = tuple(
- ticket.payload for ticket in test_rear_link.tickets
- if ticket.payload is not None)
- with test_fore_link.condition:
- back_to_front_payloads = tuple(
- ticket.payload for ticket in test_fore_link.tickets
- if ticket.payload is not None)
- self.assertTupleEqual((test_front_to_back_datum,), front_to_back_payloads)
- self.assertTupleEqual((test_back_to_front_datum,), back_to_front_payloads)
-
- def _perform_scenario_test(self, scenario):
- test_operation_id = object()
- test_method = scenario.method()
- test_fore_link = _test_links.ForeLink(None, None)
- rear_lock = threading.Lock()
- rear_sequence_number = [0]
- def rear_action(front_to_back_ticket, fore_link):
- with rear_lock:
- if front_to_back_ticket.payload is not None:
- response = scenario.response_for_request(front_to_back_ticket.payload)
- else:
- response = None
- terminal = front_to_back_ticket.kind in (
- interfaces.FrontToBackTicket.Kind.COMPLETION,
- interfaces.FrontToBackTicket.Kind.ENTIRE)
- if response is not None or terminal:
- if terminal:
- kind = interfaces.BackToFrontTicket.Kind.COMPLETION
- else:
- kind = interfaces.BackToFrontTicket.Kind.CONTINUATION
- back_to_front_ticket = interfaces.BackToFrontTicket(
- front_to_back_ticket.operation_id, rear_sequence_number[0], kind,
- response)
- rear_sequence_number[0] += 1
- fore_link.accept_back_to_front_ticket(back_to_front_ticket)
- test_rear_link = _test_links.RearLink(rear_action, None)
-
- fore_link = fore.ForeLink(
- self.fore_link_pool, {test_method: scenario.deserialize_request},
- {test_method: scenario.serialize_response}, None, ())
- fore_link.join_rear_link(test_rear_link)
- test_rear_link.join_fore_link(fore_link)
- fore_link.start()
- port = fore_link.port()
-
- rear_link = rear.RearLink(
- 'localhost', port, self.rear_link_pool,
- {test_method: scenario.serialize_request},
- {test_method: scenario.deserialize_response}, False, None, None, None)
- rear_link.join_fore_link(test_fore_link)
- test_fore_link.join_rear_link(rear_link)
- rear_link.start()
-
- commencement_ticket = interfaces.FrontToBackTicket(
- test_operation_id, 0,
- interfaces.FrontToBackTicket.Kind.COMMENCEMENT, test_method,
- interfaces.ServicedSubscription.Kind.FULL, None, None,
- _TIMEOUT)
- fore_sequence_number = 1
- rear_link.accept_front_to_back_ticket(commencement_ticket)
- for request in scenario.requests():
- continuation_ticket = interfaces.FrontToBackTicket(
- test_operation_id, fore_sequence_number,
- interfaces.FrontToBackTicket.Kind.CONTINUATION, None, None, None,
- request, None)
- fore_sequence_number += 1
- rear_link.accept_front_to_back_ticket(continuation_ticket)
- completion_ticket = interfaces.FrontToBackTicket(
- test_operation_id, fore_sequence_number,
- interfaces.FrontToBackTicket.Kind.COMPLETION, None, None, None, None,
- None)
- fore_sequence_number += 1
- rear_link.accept_front_to_back_ticket(completion_ticket)
-
- with test_fore_link.condition:
- while (not test_fore_link.tickets or
- test_fore_link.tickets[-1].kind is not
- interfaces.BackToFrontTicket.Kind.COMPLETION):
- test_fore_link.condition.wait()
-
- rear_link.stop()
- fore_link.stop()
-
- with test_rear_link.condition:
- requests = tuple(
- ticket.payload for ticket in test_rear_link.tickets
- if ticket.payload is not None)
- with test_fore_link.condition:
- responses = tuple(
- ticket.payload for ticket in test_fore_link.tickets
- if ticket.payload is not None)
- self.assertTrue(scenario.verify_requests(requests))
- self.assertTrue(scenario.verify_responses(responses))
-
- def testEmptyScenario(self):
- self._perform_scenario_test(_proto_scenarios.EmptyScenario())
-
- def testBidirectionallyUnaryScenario(self):
- self._perform_scenario_test(_proto_scenarios.BidirectionallyUnaryScenario())
-
- def testBidirectionallyStreamingScenario(self):
- self._perform_scenario_test(
- _proto_scenarios.BidirectionallyStreamingScenario())
-
-
-if __name__ == '__main__':
- unittest.main(verbosity=2)
diff --git a/src/python/grpcio_test/grpc_test/_adapter/_lonely_rear_link_test.py b/src/python/grpcio_test/grpc_test/_adapter/_lonely_rear_link_test.py
deleted file mode 100644
index 9b5758f..0000000
--- a/src/python/grpcio_test/grpc_test/_adapter/_lonely_rear_link_test.py
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""A test of invocation-side code unconnected to an RPC server."""
-
-import unittest
-
-from grpc._adapter import rear
-from grpc.framework.base import interfaces
-from grpc.framework.foundation import logging_pool
-from grpc_test._adapter import _test_links
-
-_IDENTITY = lambda x: x
-_TIMEOUT = 2
-
-
-class LonelyRearLinkTest(unittest.TestCase):
-
- def setUp(self):
- self.pool = logging_pool.pool(8)
-
- def tearDown(self):
- self.pool.shutdown(wait=True)
-
- def testUpAndDown(self):
- rear_link = rear.RearLink(
- 'nonexistent', 54321, self.pool, {}, {}, False, None, None, None)
-
- rear_link.start()
- rear_link.stop()
-
- def _perform_lonely_client_test_with_ticket_kind(
- self, front_to_back_ticket_kind):
- test_operation_id = object()
- test_method = 'test method'
- fore_link = _test_links.ForeLink(None, None)
-
- rear_link = rear.RearLink(
- 'nonexistent', 54321, self.pool, {test_method: None},
- {test_method: None}, False, None, None, None)
- rear_link.join_fore_link(fore_link)
- rear_link.start()
-
- front_to_back_ticket = interfaces.FrontToBackTicket(
- test_operation_id, 0, front_to_back_ticket_kind, test_method,
- interfaces.ServicedSubscription.Kind.FULL, None, None, _TIMEOUT)
- rear_link.accept_front_to_back_ticket(front_to_back_ticket)
-
- with fore_link.condition:
- while True:
- if (fore_link.tickets and
- fore_link.tickets[-1].kind is not
- interfaces.BackToFrontTicket.Kind.CONTINUATION):
- break
- fore_link.condition.wait()
-
- rear_link.stop()
-
- with fore_link.condition:
- self.assertIsNot(
- fore_link.tickets[-1].kind,
- interfaces.BackToFrontTicket.Kind.COMPLETION)
-
- def testLonelyClientCommencementTicket(self):
- self._perform_lonely_client_test_with_ticket_kind(
- interfaces.FrontToBackTicket.Kind.COMMENCEMENT)
-
- def testLonelyClientEntireTicket(self):
- self._perform_lonely_client_test_with_ticket_kind(
- interfaces.FrontToBackTicket.Kind.ENTIRE)
-
-
-if __name__ == '__main__':
- unittest.main(verbosity=2)
diff --git a/src/python/grpcio_test/grpc_test/_adapter/_test_links.py b/src/python/grpcio_test/grpc_test/_adapter/_test_links.py
deleted file mode 100644
index 86c7e61..0000000
--- a/src/python/grpcio_test/grpc_test/_adapter/_test_links.py
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Links suitable for use in tests."""
-
-import threading
-
-from grpc.framework.base import interfaces
-
-
-class ForeLink(interfaces.ForeLink):
- """A ForeLink suitable for use in tests of RearLinks."""
-
- def __init__(self, action, rear_link):
- self.condition = threading.Condition()
- self.tickets = []
- self.action = action
- self.rear_link = rear_link
-
- def accept_back_to_front_ticket(self, ticket):
- with self.condition:
- self.tickets.append(ticket)
- self.condition.notify_all()
- action, rear_link = self.action, self.rear_link
-
- if action is not None:
- action(ticket, rear_link)
-
- def join_rear_link(self, rear_link):
- with self.condition:
- self.rear_link = rear_link
-
-
-class RearLink(interfaces.RearLink):
- """A RearLink suitable for use in tests of ForeLinks."""
-
- def __init__(self, action, fore_link):
- self.condition = threading.Condition()
- self.tickets = []
- self.action = action
- self.fore_link = fore_link
-
- def accept_front_to_back_ticket(self, ticket):
- with self.condition:
- self.tickets.append(ticket)
- self.condition.notify_all()
- action, fore_link = self.action, self.fore_link
-
- if action is not None:
- action(ticket, fore_link)
-
- def join_fore_link(self, fore_link):
- with self.condition:
- self.fore_link = fore_link
diff --git a/src/python/grpcio_test/grpc_test/early_adopter/implementations_test.py b/src/python/grpcio_test/grpc_test/early_adopter/implementations_test.py
deleted file mode 100644
index 611637e..0000000
--- a/src/python/grpcio_test/grpc_test/early_adopter/implementations_test.py
+++ /dev/null
@@ -1,180 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# TODO(nathaniel): Expand this test coverage.
-
-"""Test of the GRPC-backed ForeLink and RearLink."""
-
-import unittest
-
-from grpc.early_adopter import implementations
-from grpc.framework.alpha import utilities
-from grpc_test._junkdrawer import math_pb2
-
-SERVICE_NAME = 'math.Math'
-
-DIV = 'Div'
-DIV_MANY = 'DivMany'
-FIB = 'Fib'
-SUM = 'Sum'
-
-def _fibbonacci(limit):
- left, right = 0, 1
- for _ in xrange(limit):
- yield left
- left, right = right, left + right
-
-
-def _div(request, unused_context):
- return math_pb2.DivReply(
- quotient=request.dividend / request.divisor,
- remainder=request.dividend % request.divisor)
-
-
-def _div_many(request_iterator, unused_context):
- for request in request_iterator:
- yield math_pb2.DivReply(
- quotient=request.dividend / request.divisor,
- remainder=request.dividend % request.divisor)
-
-
-def _fib(request, unused_context):
- for number in _fibbonacci(request.limit):
- yield math_pb2.Num(num=number)
-
-
-def _sum(request_iterator, unused_context):
- accumulation = 0
- for request in request_iterator:
- accumulation += request.num
- return math_pb2.Num(num=accumulation)
-
-
-_INVOCATION_DESCRIPTIONS = {
- DIV: utilities.unary_unary_invocation_description(
- math_pb2.DivArgs.SerializeToString, math_pb2.DivReply.FromString),
- DIV_MANY: utilities.stream_stream_invocation_description(
- math_pb2.DivArgs.SerializeToString, math_pb2.DivReply.FromString),
- FIB: utilities.unary_stream_invocation_description(
- math_pb2.FibArgs.SerializeToString, math_pb2.Num.FromString),
- SUM: utilities.stream_unary_invocation_description(
- math_pb2.Num.SerializeToString, math_pb2.Num.FromString),
-}
-
-_SERVICE_DESCRIPTIONS = {
- DIV: utilities.unary_unary_service_description(
- _div, math_pb2.DivArgs.FromString,
- math_pb2.DivReply.SerializeToString),
- DIV_MANY: utilities.stream_stream_service_description(
- _div_many, math_pb2.DivArgs.FromString,
- math_pb2.DivReply.SerializeToString),
- FIB: utilities.unary_stream_service_description(
- _fib, math_pb2.FibArgs.FromString, math_pb2.Num.SerializeToString),
- SUM: utilities.stream_unary_service_description(
- _sum, math_pb2.Num.FromString, math_pb2.Num.SerializeToString),
-}
-
-_TIMEOUT = 3
-
-
-class EarlyAdopterImplementationsTest(unittest.TestCase):
-
- def setUp(self):
- self.server = implementations.server(
- SERVICE_NAME, _SERVICE_DESCRIPTIONS, 0)
- self.server.start()
- port = self.server.port()
- self.stub = implementations.stub(
- SERVICE_NAME, _INVOCATION_DESCRIPTIONS, 'localhost', port)
-
- def tearDown(self):
- self.server.stop()
-
- def testUpAndDown(self):
- with self.stub:
- pass
-
- def testUnaryUnary(self):
- divisor = 59
- dividend = 973
- expected_quotient = dividend / divisor
- expected_remainder = dividend % divisor
-
- with self.stub:
- response = self.stub.Div(
- math_pb2.DivArgs(divisor=divisor, dividend=dividend), _TIMEOUT)
- self.assertEqual(expected_quotient, response.quotient)
- self.assertEqual(expected_remainder, response.remainder)
-
- def testUnaryStream(self):
- stream_length = 43
-
- with self.stub:
- response_iterator = self.stub.Fib(
- math_pb2.FibArgs(limit=stream_length), _TIMEOUT)
- numbers = tuple(response.num for response in response_iterator)
- for early, middle, later in zip(numbers, numbers[:1], numbers[:2]):
- self.assertEqual(early + middle, later)
- self.assertEqual(stream_length, len(numbers))
-
- def testStreamUnary(self):
- stream_length = 127
-
- with self.stub:
- response_future = self.stub.Sum.async(
- (math_pb2.Num(num=index) for index in range(stream_length)),
- _TIMEOUT)
- self.assertEqual(
- (stream_length * (stream_length - 1)) / 2,
- response_future.result().num)
-
- def testStreamStream(self):
- stream_length = 179
- divisor_offset = 71
- dividend_offset = 1763
-
- with self.stub:
- response_iterator = self.stub.DivMany(
- (math_pb2.DivArgs(
- divisor=divisor_offset + index,
- dividend=dividend_offset + index)
- for index in range(stream_length)),
- _TIMEOUT)
- for index, response in enumerate(response_iterator):
- self.assertEqual(
- (dividend_offset + index) / (divisor_offset + index),
- response.quotient)
- self.assertEqual(
- (dividend_offset + index) % (divisor_offset + index),
- response.remainder)
- self.assertEqual(stream_length, index + 1)
-
-
-if __name__ == '__main__':
- unittest.main(verbosity=2)
diff --git a/src/python/grpcio_test/grpc_test/framework/base/__init__.py b/src/python/grpcio_test/grpc_test/framework/base/__init__.py
deleted file mode 100644
index 7086519..0000000
--- a/src/python/grpcio_test/grpc_test/framework/base/__init__.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
diff --git a/src/python/grpcio_test/grpc_test/framework/base/implementations_test.py b/src/python/grpcio_test/grpc_test/framework/base/implementations_test.py
deleted file mode 100644
index 5a7d139..0000000
--- a/src/python/grpcio_test/grpc_test/framework/base/implementations_test.py
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Tests for grpc.framework.base.implementations."""
-
-import unittest
-
-from grpc.framework.base import implementations
-from grpc.framework.base import util
-from grpc.framework.foundation import logging_pool
-from grpc_test.framework.base import interfaces_test_case
-
-POOL_MAX_WORKERS = 10
-DEFAULT_TIMEOUT = 30
-MAXIMUM_TIMEOUT = 60
-
-
-class ImplementationsTest(
- interfaces_test_case.FrontAndBackTest, unittest.TestCase):
-
- def setUp(self):
- self.memory_transmission_pool = logging_pool.pool(POOL_MAX_WORKERS)
- self.front_work_pool = logging_pool.pool(POOL_MAX_WORKERS)
- self.front_transmission_pool = logging_pool.pool(POOL_MAX_WORKERS)
- self.front_utility_pool = logging_pool.pool(POOL_MAX_WORKERS)
- self.back_work_pool = logging_pool.pool(POOL_MAX_WORKERS)
- self.back_transmission_pool = logging_pool.pool(POOL_MAX_WORKERS)
- self.back_utility_pool = logging_pool.pool(POOL_MAX_WORKERS)
- self.test_pool = logging_pool.pool(POOL_MAX_WORKERS)
- self.test_servicer = interfaces_test_case.TestServicer(self.test_pool)
- self.front = implementations.front_link(
- self.front_work_pool, self.front_transmission_pool,
- self.front_utility_pool)
- self.back = implementations.back_link(
- self.test_servicer, self.back_work_pool, self.back_transmission_pool,
- self.back_utility_pool, DEFAULT_TIMEOUT, MAXIMUM_TIMEOUT)
- self.front.join_rear_link(self.back)
- self.back.join_fore_link(self.front)
-
- def tearDown(self):
- util.wait_for_idle(self.back)
- util.wait_for_idle(self.front)
- self.memory_transmission_pool.shutdown(wait=True)
- self.front_work_pool.shutdown(wait=True)
- self.front_transmission_pool.shutdown(wait=True)
- self.front_utility_pool.shutdown(wait=True)
- self.back_work_pool.shutdown(wait=True)
- self.back_transmission_pool.shutdown(wait=True)
- self.back_utility_pool.shutdown(wait=True)
- self.test_pool.shutdown(wait=True)
-
-
-if __name__ == '__main__':
- unittest.main(verbosity=2)
diff --git a/src/python/grpcio_test/grpc_test/framework/base/interfaces_test_case.py b/src/python/grpcio_test/grpc_test/framework/base/interfaces_test_case.py
deleted file mode 100644
index be775ad..0000000
--- a/src/python/grpcio_test/grpc_test/framework/base/interfaces_test_case.py
+++ /dev/null
@@ -1,307 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Abstract tests against the interfaces of the base layer of RPC Framework."""
-
-import threading
-import time
-
-from grpc.framework.base import interfaces
-from grpc.framework.base import util
-from grpc.framework.foundation import stream
-from grpc.framework.foundation import stream_util
-from grpc_test.framework.foundation import stream_testing
-
-TICK = 0.1
-SMALL_TIMEOUT = TICK * 50
-STREAM_LENGTH = 100
-
-SYNCHRONOUS_ECHO = 'synchronous echo'
-ASYNCHRONOUS_ECHO = 'asynchronous echo'
-IMMEDIATE_FAILURE = 'immediate failure'
-TRIGGERED_FAILURE = 'triggered failure'
-WAIT_ON_CONDITION = 'wait on condition'
-
-EMPTY_OUTCOME_DICT = {
- interfaces.Outcome.COMPLETED: 0,
- interfaces.Outcome.CANCELLED: 0,
- interfaces.Outcome.EXPIRED: 0,
- interfaces.Outcome.RECEPTION_FAILURE: 0,
- interfaces.Outcome.TRANSMISSION_FAILURE: 0,
- interfaces.Outcome.SERVICER_FAILURE: 0,
- interfaces.Outcome.SERVICED_FAILURE: 0,
- }
-
-
-def _synchronous_echo(output_consumer):
- return stream_util.TransformingConsumer(lambda x: x, output_consumer)
-
-
-class AsynchronousEcho(stream.Consumer):
- """A stream.Consumer that echoes its input to another stream.Consumer."""
-
- def __init__(self, output_consumer, pool):
- self._lock = threading.Lock()
- self._output_consumer = output_consumer
- self._pool = pool
-
- self._queue = []
- self._spinning = False
-
- def _spin(self, value, complete):
- while True:
- if value:
- if complete:
- self._output_consumer.consume_and_terminate(value)
- else:
- self._output_consumer.consume(value)
- elif complete:
- self._output_consumer.terminate()
- with self._lock:
- if self._queue:
- value, complete = self._queue.pop(0)
- else:
- self._spinning = False
- return
-
- def consume(self, value):
- with self._lock:
- if self._spinning:
- self._queue.append((value, False))
- else:
- self._spinning = True
- self._pool.submit(self._spin, value, False)
-
- def terminate(self):
- with self._lock:
- if self._spinning:
- self._queue.append((None, True))
- else:
- self._spinning = True
- self._pool.submit(self._spin, None, True)
-
- def consume_and_terminate(self, value):
- with self._lock:
- if self._spinning:
- self._queue.append((value, True))
- else:
- self._spinning = True
- self._pool.submit(self._spin, value, True)
-
-
-class TestServicer(interfaces.Servicer):
- """An interfaces.Servicer with instrumented for testing."""
-
- def __init__(self, pool):
- self._pool = pool
- self.condition = threading.Condition()
- self._released = False
-
- def service(self, name, context, output_consumer):
- if name == SYNCHRONOUS_ECHO:
- return _synchronous_echo(output_consumer)
- elif name == ASYNCHRONOUS_ECHO:
- return AsynchronousEcho(output_consumer, self._pool)
- elif name == IMMEDIATE_FAILURE:
- raise ValueError()
- elif name == TRIGGERED_FAILURE:
- raise NotImplementedError
- elif name == WAIT_ON_CONDITION:
- with self.condition:
- while not self._released:
- self.condition.wait()
- return _synchronous_echo(output_consumer)
- else:
- raise NotImplementedError()
-
- def release(self):
- with self.condition:
- self._released = True
- self.condition.notify_all()
-
-
-class EasyServicedIngestor(interfaces.ServicedIngestor):
- """A trivial implementation of interfaces.ServicedIngestor."""
-
- def __init__(self, consumer):
- self._consumer = consumer
-
- def consumer(self, operation_context):
- """See interfaces.ServicedIngestor.consumer for specification."""
- return self._consumer
-
-
-class FrontAndBackTest(object):
- """A test suite usable against any joined Front and Back."""
-
- # Pylint doesn't know that this is a unittest.TestCase mix-in.
- # pylint: disable=invalid-name
-
- def testSimplestCall(self):
- """Tests the absolute simplest call - a one-ticket fire-and-forget."""
- self.front.operate(
- SYNCHRONOUS_ECHO, None, True, SMALL_TIMEOUT,
- util.none_serviced_subscription(), 'test trace ID')
- util.wait_for_idle(self.front)
- self.assertEqual(
- 1, self.front.operation_stats()[interfaces.Outcome.COMPLETED])
-
- # Assuming nothing really pathological (such as pauses on the order of
- # SMALL_TIMEOUT interfering with this test) there are a two different ways
- # the back could have experienced execution up to this point:
- # (1) The ticket is still either in the front waiting to be transmitted
- # or is somewhere on the link between the front and the back. The back has
- # no idea that this test is even happening. Calling wait_for_idle on it
- # would do no good because in this case the back is idle and the call would
- # return with the ticket bound for it still in the front or on the link.
- back_operation_stats = self.back.operation_stats()
- first_back_possibility = EMPTY_OUTCOME_DICT
- # (2) The ticket arrived at the back and the back completed the operation.
- second_back_possibility = dict(EMPTY_OUTCOME_DICT)
- second_back_possibility[interfaces.Outcome.COMPLETED] = 1
- self.assertIn(
- back_operation_stats, (first_back_possibility, second_back_possibility))
- # It's true that if the ticket had arrived at the back and the back had
- # begun processing that wait_for_idle could hold test execution until the
- # back completed the operation, but that doesn't really collapse the
- # possibility space down to one solution.
-
- def testEntireEcho(self):
- """Tests a very simple one-ticket-each-way round-trip."""
- test_payload = 'test payload'
- test_consumer = stream_testing.TestConsumer()
- subscription = util.full_serviced_subscription(
- EasyServicedIngestor(test_consumer))
-
- self.front.operate(
- ASYNCHRONOUS_ECHO, test_payload, True, SMALL_TIMEOUT, subscription,
- 'test trace ID')
-
- util.wait_for_idle(self.front)
- util.wait_for_idle(self.back)
- self.assertEqual(
- 1, self.front.operation_stats()[interfaces.Outcome.COMPLETED])
- self.assertEqual(
- 1, self.back.operation_stats()[interfaces.Outcome.COMPLETED])
- self.assertListEqual([(test_payload, True)], test_consumer.calls)
-
- def testBidirectionalStreamingEcho(self):
- """Tests sending multiple tickets each way."""
- test_payload_template = 'test_payload: %03d'
- test_payloads = [test_payload_template % i for i in range(STREAM_LENGTH)]
- test_consumer = stream_testing.TestConsumer()
- subscription = util.full_serviced_subscription(
- EasyServicedIngestor(test_consumer))
-
- operation = self.front.operate(
- SYNCHRONOUS_ECHO, None, False, SMALL_TIMEOUT, subscription,
- 'test trace ID')
-
- for test_payload in test_payloads:
- operation.consumer.consume(test_payload)
- operation.consumer.terminate()
-
- util.wait_for_idle(self.front)
- util.wait_for_idle(self.back)
- self.assertEqual(
- 1, self.front.operation_stats()[interfaces.Outcome.COMPLETED])
- self.assertEqual(
- 1, self.back.operation_stats()[interfaces.Outcome.COMPLETED])
- self.assertListEqual(test_payloads, test_consumer.values())
-
- def testCancellation(self):
- """Tests cancelling a long-lived operation."""
- test_consumer = stream_testing.TestConsumer()
- subscription = util.full_serviced_subscription(
- EasyServicedIngestor(test_consumer))
-
- operation = self.front.operate(
- ASYNCHRONOUS_ECHO, None, False, SMALL_TIMEOUT, subscription,
- 'test trace ID')
- operation.cancel()
-
- util.wait_for_idle(self.front)
- self.assertEqual(
- 1, self.front.operation_stats()[interfaces.Outcome.CANCELLED])
- util.wait_for_idle(self.back)
- self.assertListEqual([], test_consumer.calls)
-
- # Assuming nothing really pathological (such as pauses on the order of
- # SMALL_TIMEOUT interfering with this test) there are a two different ways
- # the back could have experienced execution up to this point:
- # (1) Both tickets are still either in the front waiting to be transmitted
- # or are somewhere on the link between the front and the back. The back has
- # no idea that this test is even happening. Calling wait_for_idle on it
- # would do no good because in this case the back is idle and the call would
- # return with the tickets bound for it still in the front or on the link.
- back_operation_stats = self.back.operation_stats()
- first_back_possibility = EMPTY_OUTCOME_DICT
- # (2) Both tickets arrived within SMALL_TIMEOUT of one another at the back.
- # The back started processing based on the first ticket and then stopped
- # upon receiving the cancellation ticket.
- second_back_possibility = dict(EMPTY_OUTCOME_DICT)
- second_back_possibility[interfaces.Outcome.CANCELLED] = 1
- self.assertIn(
- back_operation_stats, (first_back_possibility, second_back_possibility))
-
- def testExpiration(self):
- """Tests that operations time out."""
- timeout = TICK * 2
- allowance = TICK # How much extra time to
- condition = threading.Condition()
- test_payload = 'test payload'
- subscription = util.termination_only_serviced_subscription()
- start_time = time.time()
-
- outcome_cell = [None]
- termination_time_cell = [None]
- def termination_action(outcome):
- with condition:
- outcome_cell[0] = outcome
- termination_time_cell[0] = time.time()
- condition.notify()
-
- with condition:
- operation = self.front.operate(
- SYNCHRONOUS_ECHO, test_payload, False, timeout, subscription,
- 'test trace ID')
- operation.context.add_termination_callback(termination_action)
- while outcome_cell[0] is None:
- condition.wait()
-
- duration = termination_time_cell[0] - start_time
- self.assertLessEqual(timeout, duration)
- self.assertLess(duration, timeout + allowance)
- self.assertEqual(interfaces.Outcome.EXPIRED, outcome_cell[0])
- util.wait_for_idle(self.front)
- self.assertEqual(
- 1, self.front.operation_stats()[interfaces.Outcome.EXPIRED])
- util.wait_for_idle(self.back)
- self.assertLessEqual(
- 1, self.back.operation_stats()[interfaces.Outcome.EXPIRED])
diff --git a/src/python/grpcio_test/grpc_test/framework/face/_test_case.py b/src/python/grpcio_test/grpc_test/framework/face/_test_case.py
deleted file mode 100644
index 486b6e6..0000000
--- a/src/python/grpcio_test/grpc_test/framework/face/_test_case.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Common lifecycle code for in-memory-ticket-exchange Face-layer tests."""
-
-from grpc.framework.face import implementations
-from grpc.framework.foundation import logging_pool
-from grpc_test.framework.face.testing import base_util
-from grpc_test.framework.face.testing import test_case
-
-_TIMEOUT = 3
-_MAXIMUM_POOL_SIZE = 10
-
-
-class FaceTestCase(test_case.FaceTestCase):
- """Provides abstract Face-layer tests an in-memory implementation."""
-
- def set_up_implementation(
- self, name, methods, method_implementations,
- multi_method_implementation):
- servicer_pool = logging_pool.pool(_MAXIMUM_POOL_SIZE)
- stub_pool = logging_pool.pool(_MAXIMUM_POOL_SIZE)
-
- servicer = implementations.servicer(
- servicer_pool, method_implementations, multi_method_implementation)
-
- linked_pair = base_util.linked_pair(servicer, _TIMEOUT)
- stub = implementations.generic_stub(linked_pair.front, stub_pool)
- return stub, (servicer_pool, stub_pool, linked_pair)
-
- def tear_down_implementation(self, memo):
- servicer_pool, stub_pool, linked_pair = memo
- linked_pair.shut_down()
- stub_pool.shutdown(wait=True)
- servicer_pool.shutdown(wait=True)
diff --git a/src/python/grpcio_test/grpc_test/framework/face/blocking_invocation_inline_service_test.py b/src/python/grpcio_test/grpc_test/framework/face/blocking_invocation_inline_service_test.py
deleted file mode 100644
index 8674666..0000000
--- a/src/python/grpcio_test/grpc_test/framework/face/blocking_invocation_inline_service_test.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""One of the tests of the Face layer of RPC Framework."""
-
-import unittest
-
-from grpc_test.framework.face import _test_case
-from grpc_test.framework.face.testing import blocking_invocation_inline_service_test_case as test_case
-
-
-class BlockingInvocationInlineServiceTest(
- _test_case.FaceTestCase,
- test_case.BlockingInvocationInlineServiceTestCase,
- unittest.TestCase):
- pass
-
-
-if __name__ == '__main__':
- unittest.main(verbosity=2)
diff --git a/src/python/grpcio_test/grpc_test/framework/face/event_invocation_synchronous_event_service_test.py b/src/python/grpcio_test/grpc_test/framework/face/event_invocation_synchronous_event_service_test.py
deleted file mode 100644
index dca373e..0000000
--- a/src/python/grpcio_test/grpc_test/framework/face/event_invocation_synchronous_event_service_test.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""One of the tests of the Face layer of RPC Framework."""
-
-import unittest
-
-from grpc_test.framework.face import _test_case
-from grpc_test.framework.face.testing import event_invocation_synchronous_event_service_test_case as test_case
-
-
-class EventInvocationSynchronousEventServiceTest(
- _test_case.FaceTestCase,
- test_case.EventInvocationSynchronousEventServiceTestCase,
- unittest.TestCase):
- pass
-
-
-if __name__ == '__main__':
- unittest.main(verbosity=2)
diff --git a/src/python/grpcio_test/grpc_test/framework/face/future_invocation_asynchronous_event_service_test.py b/src/python/grpcio_test/grpc_test/framework/face/future_invocation_asynchronous_event_service_test.py
deleted file mode 100644
index 99fdf18..0000000
--- a/src/python/grpcio_test/grpc_test/framework/face/future_invocation_asynchronous_event_service_test.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""One of the tests of the Face layer of RPC Framework."""
-
-import unittest
-
-from grpc_test.framework.face import _test_case
-from grpc_test.framework.face.testing import future_invocation_asynchronous_event_service_test_case as test_case
-
-
-class FutureInvocationAsynchronousEventServiceTest(
- _test_case.FaceTestCase,
- test_case.FutureInvocationAsynchronousEventServiceTestCase,
- unittest.TestCase):
- pass
-
-
-if __name__ == '__main__':
- unittest.main(verbosity=2)
diff --git a/src/python/grpcio_test/grpc_test/framework/face/testing/serial.py b/src/python/grpcio_test/grpc_test/framework/face/testing/serial.py
deleted file mode 100644
index 47fc582..0000000
--- a/src/python/grpcio_test/grpc_test/framework/face/testing/serial.py
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Utility for serialization in the context of test RPC services."""
-
-import collections
-
-
-class Serialization(
- collections.namedtuple(
- '_Serialization',
- ['request_serializers',
- 'request_deserializers',
- 'response_serializers',
- 'response_deserializers'])):
- """An aggregation of serialization behaviors for an RPC service.
-
- Attributes:
- request_serializers: A dict from method name to request object serializer
- behavior.
- request_deserializers: A dict from method name to request object
- deserializer behavior.
- response_serializers: A dict from method name to response object serializer
- behavior.
- response_deserializers: A dict from method name to response object
- deserializer behavior.
- """
-
-
-def serialization(methods):
- """Creates a Serialization from a sequences of interfaces.Method objects."""
- request_serializers = {}
- request_deserializers = {}
- response_serializers = {}
- response_deserializers = {}
- for method in methods:
- name = method.name()
- request_serializers[name] = method.serialize_request
- request_deserializers[name] = method.deserialize_request
- response_serializers[name] = method.serialize_response
- response_deserializers[name] = method.deserialize_response
- return Serialization(
- request_serializers, request_deserializers, response_serializers,
- response_deserializers)
diff --git a/src/python/grpcio_test/setup.py b/src/python/grpcio_test/setup.py
index 0f43b4a..e9ee45a 100644
--- a/src/python/grpcio_test/setup.py
+++ b/src/python/grpcio_test/setup.py
@@ -77,7 +77,9 @@
)
_COMMAND_CLASS = {
- 'test': commands.RunTests
+ 'test': commands.RunTests,
+ 'build_proto_modules': commands.BuildProtoModules,
+ 'build_py': commands.BuildPy,
}
setuptools.setup(
diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template
index e86449f..52070cf 100644
--- a/templates/binding.gyp.template
+++ b/templates/binding.gyp.template
@@ -56,7 +56,9 @@
],
'include_dirs': [
'.',
- 'include'
+ 'include',
+ '<(node_root_dir)/deps/openssl/openssl/include',
+ '<(node_root_dir)/deps/zlib'
],
'conditions': [
['OS != "win"', {
@@ -75,6 +77,15 @@
]
]
}],
+ ["target_arch=='ia32'", {
+ "include_dirs": [ "<(node_root_dir)/deps/openssl/config/piii" ]
+ }],
+ ["target_arch=='x64'", {
+ "include_dirs": [ "<(node_root_dir)/deps/openssl/config/k8" ]
+ }],
+ ["target_arch=='arm'", {
+ "include_dirs": [ "<(node_root_dir)/deps/openssl/config/arm" ]
+ }]
]
},
'targets': [
@@ -94,6 +105,13 @@
'${source}',
% endfor
],
+ "conditions": [
+ ['OS == "mac"', {
+ 'xcode_settings': {
+ 'MACOSX_DEPLOYMENT_TARGET': '10.9'
+ }
+ }]
+ ],
},
% endif
% endfor
diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template
index 3b96fe2..3885cb3 100644
--- a/templates/gRPC.podspec.template
+++ b/templates/gRPC.podspec.template
@@ -88,8 +88,12 @@
ss.header_mappings_dir = '.'
# This isn't officially supported in Cocoapods. We've asked for an alternative:
# https://github.com/CocoaPods/CocoaPods/issues/4386
- ss.xcconfig = { 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC" ' +
- '"$(PODS_ROOT)/Headers/Private/gRPC/include"' }
+ ss.xcconfig = {
+ 'USE_HEADERMAP' => 'NO',
+ 'ALWAYS_SEARCH_USER_PATHS' => 'NO',
+ 'USER_HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC"',
+ 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC/include"'
+ }
ss.requires_arc = false
ss.libraries = 'z'
diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc
index 5169945..96502e5 100644
--- a/test/cpp/interop/interop_client.cc
+++ b/test/cpp/interop/interop_client.cc
@@ -82,8 +82,46 @@
}
} // namespace
+InteropClient::ServiceStub::ServiceStub(std::shared_ptr<Channel> channel,
+ bool new_stub_every_call)
+ : channel_(channel), new_stub_every_call_(new_stub_every_call) {
+ // If new_stub_every_call is false, then this is our chance to initialize
+ // stub_. (see Get())
+ if (!new_stub_every_call) {
+ stub_ = TestService::NewStub(channel);
+ }
+}
+
+TestService::Stub* InteropClient::ServiceStub::Get() {
+ if (new_stub_every_call_) {
+ stub_ = TestService::NewStub(channel_);
+ }
+
+ return stub_.get();
+}
+
+void InteropClient::ServiceStub::Reset(std::shared_ptr<Channel> channel) {
+ channel_ = channel;
+
+ // Update stub_ as well. Note: If new_stub_every_call_ is true, we can reset
+ // the stub_ since the next call to Get() will create a new stub
+ if (new_stub_every_call_) {
+ stub_.reset();
+ } else {
+ stub_ = TestService::NewStub(channel);
+ }
+}
+
+void InteropClient::Reset(std::shared_ptr<Channel> channel) {
+ serviceStub_.Reset(channel);
+}
+
InteropClient::InteropClient(std::shared_ptr<Channel> channel)
- : channel_(channel) {}
+ : serviceStub_(channel, true) {}
+
+InteropClient::InteropClient(std::shared_ptr<Channel> channel,
+ bool new_stub_every_test_case)
+ : serviceStub_(channel, new_stub_every_test_case) {}
void InteropClient::AssertOkOrPrintErrorStatus(const Status& s) {
if (s.ok()) {
@@ -96,13 +134,12 @@
void InteropClient::DoEmpty() {
gpr_log(GPR_INFO, "Sending an empty rpc...");
- std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_));
Empty request = Empty::default_instance();
Empty response = Empty::default_instance();
ClientContext context;
- Status s = stub->EmptyCall(&context, request, &response);
+ Status s = serviceStub_.Get()->EmptyCall(&context, request, &response);
AssertOkOrPrintErrorStatus(s);
gpr_log(GPR_INFO, "Empty rpc done.");
@@ -111,8 +148,6 @@
// Shared code to set large payload, make rpc and check response payload.
void InteropClient::PerformLargeUnary(SimpleRequest* request,
SimpleResponse* response) {
- std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_));
-
ClientContext context;
InteropClientContextInspector inspector(context);
// If the request doesn't already specify the response type, default to
@@ -121,7 +156,7 @@
grpc::string payload(kLargeRequestSize, '\0');
request->mutable_payload()->set_body(payload.c_str(), kLargeRequestSize);
- Status s = stub->UnaryCall(&context, *request, response);
+ Status s = serviceStub_.Get()->UnaryCall(&context, *request, response);
// Compression related checks.
GPR_ASSERT(request->response_compression() ==
@@ -187,11 +222,10 @@
SimpleResponse response;
request.set_fill_username(true);
request.set_fill_oauth_scope(true);
- std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_));
ClientContext context;
- Status s = stub->UnaryCall(&context, request, &response);
+ Status s = serviceStub_.Get()->UnaryCall(&context, request, &response);
AssertOkOrPrintErrorStatus(s);
GPR_ASSERT(!response.username().empty());
@@ -207,7 +241,6 @@
SimpleRequest request;
SimpleResponse response;
request.set_fill_username(true);
- std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_));
ClientContext context;
std::chrono::seconds token_lifetime = std::chrono::hours(1);
@@ -216,7 +249,7 @@
context.set_credentials(creds);
- Status s = stub->UnaryCall(&context, request, &response);
+ Status s = serviceStub_.Get()->UnaryCall(&context, request, &response);
AssertOkOrPrintErrorStatus(s);
GPR_ASSERT(!response.username().empty());
@@ -269,14 +302,13 @@
void InteropClient::DoRequestStreaming() {
gpr_log(GPR_INFO, "Sending request steaming rpc ...");
- std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_));
ClientContext context;
StreamingInputCallRequest request;
StreamingInputCallResponse response;
std::unique_ptr<ClientWriter<StreamingInputCallRequest>> stream(
- stub->StreamingInputCall(&context, &response));
+ serviceStub_.Get()->StreamingInputCall(&context, &response));
int aggregated_payload_size = 0;
for (unsigned int i = 0; i < request_stream_sizes.size(); ++i) {
@@ -295,7 +327,6 @@
void InteropClient::DoResponseStreaming() {
gpr_log(GPR_INFO, "Receiving response steaming rpc ...");
- std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_));
ClientContext context;
StreamingOutputCallRequest request;
@@ -305,7 +336,7 @@
}
StreamingOutputCallResponse response;
std::unique_ptr<ClientReader<StreamingOutputCallResponse>> stream(
- stub->StreamingOutputCall(&context, request));
+ serviceStub_.Get()->StreamingOutputCall(&context, request));
unsigned int i = 0;
while (stream->Read(&response)) {
@@ -320,8 +351,6 @@
}
void InteropClient::DoResponseCompressedStreaming() {
- std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_));
-
const CompressionType compression_types[] = {NONE, GZIP, DEFLATE};
const PayloadType payload_types[] = {COMPRESSABLE, UNCOMPRESSABLE, RANDOM};
for (size_t i = 0; i < GPR_ARRAY_SIZE(payload_types); i++) {
@@ -348,7 +377,7 @@
StreamingOutputCallResponse response;
std::unique_ptr<ClientReader<StreamingOutputCallResponse>> stream(
- stub->StreamingOutputCall(&context, request));
+ serviceStub_.Get()->StreamingOutputCall(&context, request));
size_t k = 0;
while (stream->Read(&response)) {
@@ -401,7 +430,6 @@
void InteropClient::DoResponseStreamingWithSlowConsumer() {
gpr_log(GPR_INFO, "Receiving response steaming rpc with slow consumer ...");
- std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_));
ClientContext context;
StreamingOutputCallRequest request;
@@ -412,7 +440,7 @@
}
StreamingOutputCallResponse response;
std::unique_ptr<ClientReader<StreamingOutputCallResponse>> stream(
- stub->StreamingOutputCall(&context, request));
+ serviceStub_.Get()->StreamingOutputCall(&context, request));
int i = 0;
while (stream->Read(&response)) {
@@ -431,12 +459,11 @@
void InteropClient::DoHalfDuplex() {
gpr_log(GPR_INFO, "Sending half-duplex streaming rpc ...");
- std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_));
ClientContext context;
std::unique_ptr<ClientReaderWriter<StreamingOutputCallRequest,
StreamingOutputCallResponse>>
- stream(stub->HalfDuplexCall(&context));
+ stream(serviceStub_.Get()->HalfDuplexCall(&context));
StreamingOutputCallRequest request;
ResponseParameters* response_parameter = request.add_response_parameters();
@@ -461,12 +488,11 @@
void InteropClient::DoPingPong() {
gpr_log(GPR_INFO, "Sending Ping Pong streaming rpc ...");
- std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_));
ClientContext context;
std::unique_ptr<ClientReaderWriter<StreamingOutputCallRequest,
StreamingOutputCallResponse>>
- stream(stub->FullDuplexCall(&context));
+ stream(serviceStub_.Get()->FullDuplexCall(&context));
StreamingOutputCallRequest request;
request.set_response_type(PayloadType::COMPRESSABLE);
@@ -491,14 +517,13 @@
void InteropClient::DoCancelAfterBegin() {
gpr_log(GPR_INFO, "Sending request steaming rpc ...");
- std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_));
ClientContext context;
StreamingInputCallRequest request;
StreamingInputCallResponse response;
std::unique_ptr<ClientWriter<StreamingInputCallRequest>> stream(
- stub->StreamingInputCall(&context, &response));
+ serviceStub_.Get()->StreamingInputCall(&context, &response));
gpr_log(GPR_INFO, "Trying to cancel...");
context.TryCancel();
@@ -509,12 +534,11 @@
void InteropClient::DoCancelAfterFirstResponse() {
gpr_log(GPR_INFO, "Sending Ping Pong streaming rpc ...");
- std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_));
ClientContext context;
std::unique_ptr<ClientReaderWriter<StreamingOutputCallRequest,
StreamingOutputCallResponse>>
- stream(stub->FullDuplexCall(&context));
+ stream(serviceStub_.Get()->FullDuplexCall(&context));
StreamingOutputCallRequest request;
request.set_response_type(PayloadType::COMPRESSABLE);
@@ -534,7 +558,6 @@
void InteropClient::DoTimeoutOnSleepingServer() {
gpr_log(GPR_INFO, "Sending Ping Pong streaming rpc with a short deadline...");
- std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_));
ClientContext context;
std::chrono::system_clock::time_point deadline =
@@ -542,7 +565,7 @@
context.set_deadline(deadline);
std::unique_ptr<ClientReaderWriter<StreamingOutputCallRequest,
StreamingOutputCallResponse>>
- stream(stub->FullDuplexCall(&context));
+ stream(serviceStub_.Get()->FullDuplexCall(&context));
StreamingOutputCallRequest request;
request.mutable_payload()->set_body(grpc::string(27182, '\0'));
@@ -555,12 +578,11 @@
void InteropClient::DoEmptyStream() {
gpr_log(GPR_INFO, "Starting empty_stream.");
- std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_));
ClientContext context;
std::unique_ptr<ClientReaderWriter<StreamingOutputCallRequest,
StreamingOutputCallResponse>>
- stream(stub->FullDuplexCall(&context));
+ stream(serviceStub_.Get()->FullDuplexCall(&context));
stream->WritesDone();
StreamingOutputCallResponse response;
GPR_ASSERT(stream->Read(&response) == false);
@@ -571,7 +593,6 @@
void InteropClient::DoStatusWithMessage() {
gpr_log(GPR_INFO, "Sending RPC with a request for status code 2 and message");
- std::unique_ptr<TestService::Stub> stub(TestService::NewStub(channel_));
ClientContext context;
SimpleRequest request;
@@ -581,7 +602,7 @@
grpc::string test_msg = "This is a test message";
requested_status->set_message(test_msg);
- Status s = stub->UnaryCall(&context, request, &response);
+ Status s = serviceStub_.Get()->UnaryCall(&context, request, &response);
GPR_ASSERT(s.error_code() == grpc::StatusCode::UNKNOWN);
GPR_ASSERT(s.error_message() == test_msg);
diff --git a/test/cpp/interop/interop_client.h b/test/cpp/interop/interop_client.h
index ebecd68..1bfb49d 100644
--- a/test/cpp/interop/interop_client.h
+++ b/test/cpp/interop/interop_client.h
@@ -39,6 +39,7 @@
#include <grpc/grpc.h>
#include <grpc++/channel.h>
#include "test/proto/messages.grpc.pb.h"
+#include "test/proto/test.grpc.pb.h"
namespace grpc {
namespace testing {
@@ -46,9 +47,14 @@
class InteropClient {
public:
explicit InteropClient(std::shared_ptr<Channel> channel);
+ explicit InteropClient(
+ std::shared_ptr<Channel> channel,
+ bool new_stub_every_test_case); // If new_stub_every_test_case is true,
+ // a new TestService::Stub object is
+ // created for every test case below
~InteropClient() {}
- void Reset(std::shared_ptr<Channel> channel) { channel_ = channel; }
+ void Reset(std::shared_ptr<Channel> channel);
void DoEmpty();
void DoLargeUnary();
@@ -76,10 +82,26 @@
void DoPerRpcCreds(const grpc::string& json_key);
private:
+ class ServiceStub {
+ public:
+ // If new_stub_every_call = true, pointer to a new instance of
+ // TestServce::Stub is returned by Get() everytime it is called
+ ServiceStub(std::shared_ptr<Channel> channel, bool new_stub_every_call);
+
+ TestService::Stub* Get();
+
+ void Reset(std::shared_ptr<Channel> channel);
+
+ private:
+ std::unique_ptr<TestService::Stub> stub_;
+ std::shared_ptr<Channel> channel_;
+ bool new_stub_every_call_; // If true, a new stub is returned by every
+ // Get() call
+ };
+
void PerformLargeUnary(SimpleRequest* request, SimpleResponse* response);
void AssertOkOrPrintErrorStatus(const Status& s);
-
- std::shared_ptr<Channel> channel_;
+ ServiceStub serviceStub_;
};
} // namespace testing
diff --git a/test/cpp/interop/stress_interop_client.cc b/test/cpp/interop/stress_interop_client.cc
new file mode 100644
index 0000000..f8c55cf
--- /dev/null
+++ b/test/cpp/interop/stress_interop_client.cc
@@ -0,0 +1,161 @@
+/*
+ *
+ * Copyright 2015, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *is % allowed in string
+ */
+
+#include "test/cpp/interop/stress_interop_client.h"
+
+#include <memory>
+#include <string>
+#include <vector>
+
+#include <grpc++/create_channel.h>
+
+#include "test/cpp/interop/interop_client.h"
+
+namespace grpc {
+namespace testing {
+
+using std::pair;
+using std::vector;
+
+WeightedRandomTestSelector::WeightedRandomTestSelector(
+ const vector<pair<TestCaseType, int>>& tests)
+ : tests_(tests) {
+ total_weight_ = 0;
+ for (auto it = tests.begin(); it != tests.end(); it++) {
+ total_weight_ += it->second;
+ }
+}
+
+// Returns a weighted-randomly selected test case based on the test weights
+// passed in the constructror
+TestCaseType WeightedRandomTestSelector::GetNextTest() const {
+ int random = 0;
+ TestCaseType selected_test = UNKNOWN_TEST;
+
+ // Get a random number from [0 to the total_weight - 1]
+ random = rand() % total_weight_;
+
+ int weight_sofar = 0;
+ for (auto it = tests_.begin(); it != tests_.end(); it++) {
+ weight_sofar += it->second;
+ if (random < weight_sofar) {
+ selected_test = it->first;
+ break;
+ }
+ }
+
+ // It is a bug in the logic if no test is selected at this point
+ GPR_ASSERT(selected_test != UNKNOWN_TEST);
+ return selected_test;
+}
+
+StressTestInteropClient::StressTestInteropClient(
+ int test_id, const grpc::string& server_address,
+ const WeightedRandomTestSelector& test_selector, long test_duration_secs,
+ long sleep_duration_ms)
+ : test_id_(test_id),
+ server_address_(server_address),
+ test_selector_(test_selector),
+ test_duration_secs_(test_duration_secs),
+ sleep_duration_ms_(sleep_duration_ms) {
+ // TODO(sreek): This will change once we add support for other tests
+ // that won't work with InsecureCredentials()
+ std::shared_ptr<Channel> channel(
+ CreateChannel(server_address, InsecureCredentials()));
+ interop_client_.reset(new InteropClient(channel, false));
+}
+
+void StressTestInteropClient::MainLoop() {
+ gpr_log(GPR_INFO, "Running test %d. ServerAddr: %s", test_id_,
+ server_address_.c_str());
+
+ gpr_timespec test_end_time =
+ gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
+ gpr_time_from_seconds(test_duration_secs_, GPR_TIMESPAN));
+
+ gpr_timespec current_time = gpr_now(GPR_CLOCK_REALTIME);
+ while (test_duration_secs_ < 0 ||
+ gpr_time_cmp(current_time, test_end_time) < 0) {
+ // Select the test case to execute based on the weights and execute it
+ TestCaseType test_case = test_selector_.GetNextTest();
+ gpr_log(GPR_INFO, "%d - Executing the test case %d", test_id_, test_case);
+ RunTest(test_case);
+
+ // Sleep between successive calls if needed
+ if (sleep_duration_ms_ > 0) {
+ gpr_timespec sleep_time = gpr_time_add(
+ current_time, gpr_time_from_millis(sleep_duration_ms_, GPR_TIMESPAN));
+ gpr_sleep_until(sleep_time);
+ }
+
+ current_time = gpr_now(GPR_CLOCK_REALTIME);
+ }
+}
+
+// TODO(sree): Add all interop tests
+void StressTestInteropClient::RunTest(TestCaseType test_case) {
+ switch (test_case) {
+ case EMPTY_UNARY: {
+ interop_client_->DoEmpty();
+ break;
+ }
+ case LARGE_UNARY: {
+ interop_client_->DoLargeUnary();
+ break;
+ }
+ case LARGE_COMPRESSED_UNARY: {
+ interop_client_->DoLargeCompressedUnary();
+ break;
+ }
+ case CLIENT_STREAMING: {
+ interop_client_->DoRequestStreaming();
+ break;
+ }
+ case SERVER_STREAMING: {
+ interop_client_->DoResponseStreaming();
+ break;
+ }
+ case EMPTY_STREAM: {
+ interop_client_->DoEmptyStream();
+ break;
+ }
+ default: {
+ gpr_log(GPR_ERROR, "Invalid test case (%d)", test_case);
+ GPR_ASSERT(false);
+ break;
+ }
+ }
+}
+
+} // namespace testing
+} // namespace grpc
diff --git a/test/cpp/interop/stress_interop_client.h b/test/cpp/interop/stress_interop_client.h
new file mode 100644
index 0000000..36261e5
--- /dev/null
+++ b/test/cpp/interop/stress_interop_client.h
@@ -0,0 +1,106 @@
+/*
+ *
+ * Copyright 2015, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *is % allowed in string
+ */
+
+#ifndef GRPC_TEST_CPP_STRESS_INTEROP_CLIENT_H
+#define GRPC_TEST_CPP_STRESS_INTEROP_CLIENT_H
+
+#include <memory>
+#include <string>
+#include <vector>
+
+#include <grpc++/create_channel.h>
+
+#include "test/cpp/interop/interop_client.h"
+
+namespace grpc {
+namespace testing {
+
+using std::pair;
+using std::vector;
+
+// TODO(sreek): Add more test cases here in future
+enum TestCaseType {
+ UNKNOWN_TEST = -1,
+ EMPTY_UNARY = 0,
+ LARGE_UNARY = 1,
+ LARGE_COMPRESSED_UNARY = 2,
+ CLIENT_STREAMING = 3,
+ SERVER_STREAMING = 4,
+ EMPTY_STREAM = 5
+};
+
+const vector<pair<TestCaseType, grpc::string>> kTestCaseList = {
+ {EMPTY_UNARY, "empty_unary"},
+ {LARGE_UNARY, "large_unary"},
+ {LARGE_COMPRESSED_UNARY, "large_compressed_unary"},
+ {CLIENT_STREAMING, "client_streaming"},
+ {SERVER_STREAMING, "server_streaming"},
+ {EMPTY_STREAM, "empty_stream"}};
+
+class WeightedRandomTestSelector {
+ public:
+ // Takes a vector of <test_case, weight> pairs as the input
+ WeightedRandomTestSelector(const vector<pair<TestCaseType, int>>& tests);
+
+ // Returns a weighted-randomly chosen test case based on the test cases and
+ // weights passed in the constructor
+ TestCaseType GetNextTest() const;
+
+ private:
+ const vector<pair<TestCaseType, int>> tests_;
+ int total_weight_;
+};
+
+class StressTestInteropClient {
+ public:
+ StressTestInteropClient(int test_id, const grpc::string& server_address,
+ const WeightedRandomTestSelector& test_selector,
+ long test_duration_secs, long sleep_duration_ms);
+
+ void MainLoop(); // The main function. Use this as the thread entry point.
+
+ private:
+ void RunTest(TestCaseType test_case);
+
+ int test_id_;
+ std::unique_ptr<InteropClient> interop_client_;
+ const grpc::string& server_address_;
+ const WeightedRandomTestSelector& test_selector_;
+ long test_duration_secs_;
+ long sleep_duration_ms_;
+};
+
+} // namespace testing
+} // namespace grpc
+
+#endif // GRPC_TEST_CPP_STRESS_INTEROP_CLIENT_H
diff --git a/test/cpp/interop/stress_test.cc b/test/cpp/interop/stress_test.cc
new file mode 100644
index 0000000..5d14197
--- /dev/null
+++ b/test/cpp/interop/stress_test.cc
@@ -0,0 +1,221 @@
+/*
+ *
+ * Copyright 2015, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *is % allowed in string
+ */
+
+#include <memory>
+#include <string>
+#include <thread>
+#include <utility>
+#include <vector>
+
+#include <gflags/gflags.h>
+#include <grpc/support/time.h>
+#include <grpc++/create_channel.h>
+#include <grpc++/grpc++.h>
+
+#include "test/cpp/interop/interop_client.h"
+#include "test/cpp/interop/stress_interop_client.h"
+#include "test/cpp/util/test_config.h"
+
+DEFINE_int32(sleep_duration_ms, 0,
+ "The duration (in millisec) between two"
+ " consecutive test calls (per server) issued by the server.");
+
+DEFINE_int32(test_duration_secs, -1,
+ "The length of time (in seconds) to run"
+ " the test. Enter -1 if the test should run continuously until"
+ " forcefully terminated.");
+
+DEFINE_string(server_addresses, "localhost:8080",
+ "The list of server"
+ " addresses in the format:\n"
+ " \"<name_1>:<port_1>,<name_2>:<port_1>...<name_N>:<port_N>\"\n"
+ " Note: <name> can be servername or IP address.");
+
+// TODO(sreek): Add more test cases here in future
+DEFINE_string(test_cases, "",
+ "List of test cases to call along with the"
+ " relative weights in the following format:\n"
+ " \"<testcase_1:w_1>,<testcase_2:w_2>...<testcase_n:w_n>\"\n"
+ " The following testcases are currently supported:\n"
+ " empty_unary\n"
+ " large_unary\n"
+ " large_compressed_unary\n"
+ " client_streaming\n"
+ " server_streaming\n"
+ " empty_stream\n"
+ " Example: \"empty_unary:20,large_unary:10,empty_stream:70\"\n"
+ " The above will execute 'empty_unary', 20% of the time,"
+ " 'large_unary', 10% of the time and 'empty_stream' the remaining"
+ " 70% of the time");
+
+using std::make_pair;
+using std::pair;
+using std::thread;
+using std::vector;
+
+using grpc::testing::kTestCaseList;
+using grpc::testing::StressTestInteropClient;
+using grpc::testing::TestCaseType;
+using grpc::testing::WeightedRandomTestSelector;
+using grpc::testing::UNKNOWN_TEST;
+
+TestCaseType GetTestTypeFromName(const grpc::string& test_name) {
+ TestCaseType test_case = UNKNOWN_TEST;
+
+ for (auto it = kTestCaseList.begin(); it != kTestCaseList.end(); it++) {
+ if (test_name == it->second) {
+ test_case = it->first;
+ break;
+ }
+ }
+
+ return test_case;
+}
+
+// Converts a string of comma delimited tokens to a vector of tokens
+bool ParseCommaDelimitedString(const grpc::string& comma_delimited_str,
+ vector<grpc::string>& tokens) {
+ size_t bpos = 0;
+ size_t epos = grpc::string::npos;
+
+ while ((epos = comma_delimited_str.find(',', bpos)) != grpc::string::npos) {
+ tokens.emplace_back(comma_delimited_str.substr(bpos, epos - bpos));
+ bpos = epos + 1;
+ }
+
+ tokens.emplace_back(comma_delimited_str.substr(bpos)); // Last token
+ return true;
+}
+
+// Input: Test case string "<testcase_name:weight>,<testcase_name:weight>...."
+// Output:
+// - Whether parsing was successful (return value)
+// - Vector of (test_type_enum, weight) pairs returned via 'tests' parameter
+bool ParseTestCasesString(const grpc::string& test_cases,
+ vector<pair<TestCaseType, int>>& tests) {
+ bool is_success = true;
+
+ vector<grpc::string> tokens;
+ ParseCommaDelimitedString(test_cases, tokens);
+
+ for (auto it = tokens.begin(); it != tokens.end(); it++) {
+ // Token is in the form <test_name>:<test_weight>
+ size_t colon_pos = it->find(':');
+ if (colon_pos == grpc::string::npos) {
+ gpr_log(GPR_ERROR, "Error in parsing test case string: %s", it->c_str());
+ is_success = false;
+ break;
+ }
+
+ grpc::string test_name = it->substr(0, colon_pos);
+ int weight = std::stoi(it->substr(colon_pos + 1));
+ TestCaseType test_case = GetTestTypeFromName(test_name);
+ if (test_case == UNKNOWN_TEST) {
+ gpr_log(GPR_ERROR, "Unknown test case: %s", test_name.c_str());
+ is_success = false;
+ break;
+ }
+
+ tests.emplace_back(std::make_pair(test_case, weight));
+ }
+
+ return is_success;
+}
+
+// For debugging purposes
+void LogParameterInfo(const vector<grpc::string>& addresses,
+ const vector<pair<TestCaseType, int>>& tests) {
+ gpr_log(GPR_INFO, "server_addresses: %s", FLAGS_server_addresses.c_str());
+ gpr_log(GPR_INFO, "test_cases : %s", FLAGS_test_cases.c_str());
+ gpr_log(GPR_INFO, "sleep_duration_ms: %d", FLAGS_sleep_duration_ms);
+ gpr_log(GPR_INFO, "test_duration_secs: %d", FLAGS_test_duration_secs);
+
+ int num = 0;
+ for (auto it = addresses.begin(); it != addresses.end(); it++) {
+ gpr_log(GPR_INFO, "%d:%s", ++num, it->c_str());
+ }
+
+ num = 0;
+ for (auto it = tests.begin(); it != tests.end(); it++) {
+ TestCaseType test_case = it->first;
+ int weight = it->second;
+ gpr_log(GPR_INFO, "%d. TestCaseType: %d, Weight: %d", ++num, test_case,
+ weight);
+ }
+}
+
+int main(int argc, char** argv) {
+ grpc::testing::InitTest(&argc, &argv, true);
+
+ srand(time(NULL));
+
+ // Parse the server addresses
+ vector<grpc::string> server_addresses;
+ ParseCommaDelimitedString(FLAGS_server_addresses, server_addresses);
+
+ // Parse test cases and weights
+ if (FLAGS_test_cases.length() == 0) {
+ gpr_log(GPR_INFO, "Not running tests. The 'test_cases' string is empty");
+ return 1;
+ }
+
+ vector<pair<TestCaseType, int>> tests;
+ if (!ParseTestCasesString(FLAGS_test_cases, tests)) {
+ gpr_log(GPR_ERROR, "Error in parsing test cases string %s ",
+ FLAGS_test_cases.c_str());
+ return 1;
+ }
+
+ LogParameterInfo(server_addresses, tests);
+
+ WeightedRandomTestSelector test_selector(tests);
+
+ gpr_log(GPR_INFO, "Starting test(s)..");
+
+ vector<thread> test_threads;
+ int thread_idx = 0;
+ for (auto it = server_addresses.begin(); it != server_addresses.end(); it++) {
+ StressTestInteropClient* client = new StressTestInteropClient(
+ ++thread_idx, *it, test_selector, FLAGS_test_duration_secs,
+ FLAGS_sleep_duration_ms);
+
+ test_threads.emplace_back(
+ thread(&StressTestInteropClient::MainLoop, client));
+ }
+
+ for (auto it = test_threads.begin(); it != test_threads.end(); it++) {
+ it->join();
+ }
+
+ return 0;
+}
diff --git a/tools/jenkins/run_interop.sh b/tools/jenkins/run_interop.sh
index b1cf7b5..5dd477e 100755
--- a/tools/jenkins/run_interop.sh
+++ b/tools/jenkins/run_interop.sh
@@ -34,4 +34,4 @@
# Enter the gRPC repo root
cd $(dirname $0)/../..
-tools/run_tests/run_interop_tests.py -l all -s all --cloud_to_prod --cloud_to_prod_auth --use_docker -t -j 8 $@ || true
+tools/run_tests/run_interop_tests.py -l all -s all --cloud_to_prod --cloud_to_prod_auth --use_docker -t -j 12 $@ || true
diff --git a/tools/run_tests/build_csharp.sh b/tools/run_tests/build_csharp.sh
index 6737d88..2c33351 100755
--- a/tools/run_tests/build_csharp.sh
+++ b/tools/run_tests/build_csharp.sh
@@ -30,7 +30,7 @@
set -ex
-if [ "$CONFIG" = "dbg" ]
+if [ "$CONFIG" = "dbg" ] || [ "$CONFIG" = "gcov" ]
then
MSBUILD_CONFIG="Debug"
else
diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py
index a9c96a6..8343441 100755
--- a/tools/run_tests/jobset.py
+++ b/tools/run_tests/jobset.py
@@ -272,6 +272,8 @@
message('TIMEOUT_FLAKE', self._spec.shortname, stdout, do_newline=True)
self._timeout_retries += 1
self.result.retries = self._timeout_retries + self._retries
+ if self._spec.kill_handler:
+ self._spec.kill_handler(self)
self._process.terminate()
self.start()
else:
diff --git a/tools/run_tests/run_csharp.bat b/tools/run_tests/run_csharp.bat
index 310cfe0..0e33e52 100644
--- a/tools/run_tests/run_csharp.bat
+++ b/tools/run_tests/run_csharp.bat
@@ -2,13 +2,23 @@
setlocal
-@rem enter this directory
+@rem enter src/csharp directory
cd /d %~dp0\..\..\src\csharp
-@rem set UUID variable to a random GUID, we will use it to put TestResults.xml to a dedicated directory, so that parallel test runs don't collide
-for /F %%i in ('powershell -Command "[guid]::NewGuid().ToString()"') do (set UUID=%%i)
+if not "%CONFIG%" == "gcov" (
+ @rem Run tests for assembly passed as 1st arg.
-packages\NUnit.Runners.2.6.4\tools\nunit-console-x86.exe /domain:None -labels "%1/bin/Debug/%1.dll" -work test-results/%UUID% || goto :error
+ @rem set UUID variable to a random GUID, we will use it to put TestResults.xml to a dedicated directory, so that parallel test runs don't collide
+ for /F %%i in ('powershell -Command "[guid]::NewGuid().ToString()"') do (set UUID=%%i)
+
+ packages\NUnit.Runners.2.6.4\tools\nunit-console-x86.exe /domain:None -labels "%1/bin/Debug/%1.dll" -work test-results/%UUID% || goto :error
+) else (
+ @rem Run all tests with code coverage
+
+ packages\OpenCover.4.6.166\tools\OpenCover.Console.exe -target:"packages\NUnit.Runners.2.6.4\tools\nunit-console-x86.exe" -targetdir:"." -targetargs:"/domain:None -labels Grpc.Core.Tests/bin/Debug/Grpc.Core.Tests.dll Grpc.IntegrationTesting/bin/Debug/Grpc.IntegrationTesting.dll Grpc.Examples.Tests/bin/Debug/Grpc.Examples.Tests.dll Grpc.HealthCheck.Tests/bin/Debug/Grpc.HealthCheck.Tests.dll" -filter:"+[Grpc.Core]*" -register:user -output:coverage_results.xml || goto :error
+
+ packages\ReportGenerator.2.3.2.0\tools\ReportGenerator.exe -reports:"coverage_results.xml" -targetdir:"..\..\reports\csharp_coverage" -reporttypes:"Html;TextSummary" || goto :error
+)
endlocal
diff --git a/tools/run_tests/run_csharp.sh b/tools/run_tests/run_csharp.sh
index c0fedca..37e86fe 100755
--- a/tools/run_tests/run_csharp.sh
+++ b/tools/run_tests/run_csharp.sh
@@ -34,7 +34,7 @@
NUNIT_CONSOLE="mono packages/NUnit.Runners.2.6.4/tools/nunit-console.exe"
-if [ "$CONFIG" = "dbg" ]
+if [ "$CONFIG" = "dbg" ] || [ "$CONFIG" = "gcov" ]
then
MSBUILD_CONFIG="Debug"
else
@@ -45,10 +45,24 @@
cd $(dirname $0)/../..
root=`pwd`
-cd src/csharp
-
export LD_LIBRARY_PATH=$root/libs/$CONFIG
-$NUNIT_CONSOLE -labels "$1/bin/$MSBUILD_CONFIG/$1.dll"
+if [ "$CONFIG" = "gcov" ]
+then
+ (cd src/csharp; $NUNIT_CONSOLE -labels \
+ "Grpc.Core.Tests/bin/$MSBUILD_CONFIG/Grpc.Core.Tests.dll" \
+ "Grpc.Examples.Tests/bin/$MSBUILD_CONFIG/Grpc.Examples.Tests.dll" \
+ "Grpc.HealthCheck.Tests/bin/$MSBUILD_CONFIG/Grpc.HealthCheck.Tests.dll" \
+ "Grpc.IntegrationTesting/bin/$MSBUILD_CONFIG/Grpc.IntegrationTesting.dll")
+
+ gcov objs/gcov/src/csharp/ext/*.o
+ lcov --base-directory . --directory . -c -o coverage.info
+ lcov -e coverage.info '**/src/csharp/ext/*' -o coverage.info
+ genhtml -o reports/csharp_ext_coverage --num-spaces 2 \
+ -t 'gRPC C# native extension test coverage' coverage.info \
+ --rc genhtml_hi_limit=95 --rc genhtml_med_limit=80 --no-prefix
+else
+ (cd src/csharp; $NUNIT_CONSOLE -labels "$1/bin/$MSBUILD_CONFIG/$1.dll")
+fi
diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py
index c2705c8..e1d60b2 100755
--- a/tools/run_tests/run_interop_tests.py
+++ b/tools/run_tests/run_interop_tests.py
@@ -344,6 +344,11 @@
def _job_kill_handler(job):
if job._spec.container_name:
dockerjob.docker_kill(job._spec.container_name)
+ # When the job times out and we decide to kill it,
+ # we need to wait a before restarting the job
+ # to prevent "container name already in use" error.
+ # TODO(jtattermusch): figure out a cleaner way to to this.
+ time.sleep(2)
def cloud_to_prod_jobspec(language, test_case, docker_image=None, auth=False):
@@ -378,7 +383,7 @@
cwd=cwd,
environ=environ,
shortname='%s:%s:%s' % (suite_name, language, test_case),
- timeout_seconds=2*60,
+ timeout_seconds=90,
flake_retries=5 if args.allow_flakes else 0,
timeout_retries=2 if args.allow_flakes else 0,
kill_handler=_job_kill_handler)
@@ -414,7 +419,7 @@
environ=environ,
shortname='cloud_to_cloud:%s:%s_server:%s' % (language, server_name,
test_case),
- timeout_seconds=2*60,
+ timeout_seconds=90,
flake_retries=5 if args.allow_flakes else 0,
timeout_retries=2 if args.allow_flakes else 0,
kill_handler=_job_kill_handler)
@@ -676,7 +681,7 @@
do_newline=True)
for image in docker_images.itervalues():
dockerjob.remove_image(image, skip_nonexistent=True)
- exit(1);
+ sys.exit(1)
# Start interop servers.
server_jobs={}
diff --git a/tools/run_tests/run_node.sh b/tools/run_tests/run_node.sh
index d0a74e7..fff579f 100755
--- a/tools/run_tests/run_node.sh
+++ b/tools/run_tests/run_node.sh
@@ -51,5 +51,5 @@
echo '<html><head><meta http-equiv="refresh" content="0;URL=lcov-report/index.html"></head></html>' > \
../reports/node_coverage/index.html
else
- ./node_modules/mocha/bin/mocha --timeout 8000 src/node/test
+ JUNIT_REPORT_PATH=src/node/reports.xml JUNIT_REPORT_STACK=1 ./node_modules/.bin/mocha --reporter mocha-jenkins-reporter src/node/test || true
fi
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 2170824..8482b2f 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -342,10 +342,18 @@
cmd = 'tools\\run_tests\\run_csharp.bat'
else:
cmd = 'tools/run_tests/run_csharp.sh'
- return [config.job_spec([cmd, assembly],
- None, shortname=assembly,
- environ=_FORCE_ENVIRON_FOR_WRAPPERS)
- for assembly in assemblies]
+
+ if config.build_config == 'gcov':
+ # On Windows, we only collect C# code coverage.
+ # On Linux, we only collect coverage for native extension.
+ # For code coverage all tests need to run as one suite.
+ return [config.job_spec([cmd], None,
+ environ=_FORCE_ENVIRON_FOR_WRAPPERS)]
+ else:
+ return [config.job_spec([cmd, assembly],
+ None, shortname=assembly,
+ environ=_FORCE_ENVIRON_FOR_WRAPPERS)
+ for assembly in assemblies]
def pre_build_steps(self):
if self.platform == 'windows':
@@ -411,8 +419,8 @@
class Sanity(object):
def test_specs(self, config, travis):
- return [config.job_spec('tools/run_tests/run_sanity.sh', None),
- config.job_spec('tools/run_tests/check_sources_and_headers.py', None)]
+ return [config.job_spec(['tools/run_tests/run_sanity.sh'], None),
+ config.job_spec(['tools/run_tests/check_sources_and_headers.py'], None)]
def pre_build_steps(self):
return []
@@ -450,6 +458,9 @@
def build_steps(self):
return []
+ def post_tests_steps(self):
+ return []
+
def makefile_name(self):
return 'Makefile'
@@ -637,13 +648,16 @@
for target in targets]
else:
def make_jobspec(cfg, targets, makefile='Makefile'):
- return [jobset.JobSpec([os.getenv('MAKE', 'make'),
- '-f', makefile,
- '-j', '%d' % (multiprocessing.cpu_count() + 1),
- 'EXTRA_DEFINES=GRPC_TEST_SLOWDOWN_MACHINE_FACTOR=%f' %
- args.slowdown,
- 'CONFIG=%s' % cfg] + targets,
- timeout_seconds=30*60)]
+ if targets:
+ return [jobset.JobSpec([os.getenv('MAKE', 'make'),
+ '-f', makefile,
+ '-j', '%d' % (multiprocessing.cpu_count() + 1),
+ 'EXTRA_DEFINES=GRPC_TEST_SLOWDOWN_MACHINE_FACTOR=%f' %
+ args.slowdown,
+ 'CONFIG=%s' % cfg] + targets,
+ timeout_seconds=30*60)]
+ else:
+ return []
make_targets = {}
for l in languages:
makefile = l.makefile_name()
@@ -839,14 +853,14 @@
root = ET.Element('testsuites') if xml_report else None
testsuite = ET.SubElement(root, 'testsuite', id='1', package='grpc', name='tests') if xml_report else None
- if not jobset.run(all_runs, check_cancelled,
- newline_on_success=newline_on_success, travis=travis,
- infinite_runs=infinite_runs,
- maxjobs=args.jobs,
- stop_on_failure=args.stop_on_failure,
- cache=cache if not xml_report else None,
- xml_report=testsuite,
- add_env={'GRPC_TEST_PORT_SERVER': 'localhost:%d' % port_server_port}):
+ number_failures, _ = jobset.run(
+ all_runs, check_cancelled, newline_on_success=newline_on_success,
+ travis=travis, infinite_runs=infinite_runs, maxjobs=args.jobs,
+ stop_on_failure=args.stop_on_failure,
+ cache=cache if not xml_report else None,
+ xml_report=testsuite,
+ add_env={'GRPC_TEST_PORT_SERVER': 'localhost:%d' % port_server_port})
+ if number_failures:
return 2
finally:
for antagonist in antagonists:
@@ -855,8 +869,10 @@
tree = ET.ElementTree(root)
tree.write(xml_report, encoding='UTF-8')
- if not jobset.run(post_tests_steps, maxjobs=1, stop_on_failure=True,
- newline_on_success=newline_on_success, travis=travis):
+ number_failures, _ = jobset.run(
+ post_tests_steps, maxjobs=1, stop_on_failure=True,
+ newline_on_success=newline_on_success, travis=travis)
+ if number_failures:
return 3
if cache: cache.save()
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index 8c41be8..0f4e487 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -1672,6 +1672,38 @@
"gpr_test_util",
"grpc",
"grpc++",
+ "grpc++_test_config",
+ "grpc++_test_util",
+ "grpc_test_util"
+ ],
+ "headers": [
+ "test/cpp/interop/client_helper.h",
+ "test/cpp/interop/interop_client.h",
+ "test/cpp/interop/stress_interop_client.h",
+ "test/proto/empty.grpc.pb.h",
+ "test/proto/empty.pb.h",
+ "test/proto/messages.grpc.pb.h",
+ "test/proto/messages.pb.h",
+ "test/proto/test.grpc.pb.h",
+ "test/proto/test.pb.h"
+ ],
+ "language": "c++",
+ "name": "stress_test",
+ "src": [
+ "test/cpp/interop/client_helper.h",
+ "test/cpp/interop/interop_client.cc",
+ "test/cpp/interop/interop_client.h",
+ "test/cpp/interop/stress_interop_client.cc",
+ "test/cpp/interop/stress_interop_client.h",
+ "test/cpp/interop/stress_test.cc"
+ ]
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc++",
"grpc++_test_util",
"grpc_test_util",
"qps"
diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json
index 2f91844..a8366e0 100644
--- a/tools/run_tests/tests.json
+++ b/tools/run_tests/tests.json
@@ -1503,22 +1503,6 @@
"mac",
"posix"
],
- "exclude_configs": [],
- "flaky": false,
- "language": "c++",
- "name": "qps_openloop_test",
- "platforms": [
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "ci_platforms": [
- "linux",
- "mac",
- "posix"
- ],
"exclude_configs": [
"tsan"
],
diff --git a/vsprojects/coapp/openssl/.gitignore b/vsprojects/coapp/openssl/.gitignore
new file mode 100644
index 0000000..1482603
--- /dev/null
+++ b/vsprojects/coapp/openssl/.gitignore
@@ -0,0 +1,10 @@
+*.nupkg
+*.def
+/nuget.exe
+/packages
+/Debug
+/Release
+/output
+/x64
+/dest
+
diff --git a/vsprojects/coapp/openssl/README.md b/vsprojects/coapp/openssl/README.md
new file mode 100644
index 0000000..e15831c
--- /dev/null
+++ b/vsprojects/coapp/openssl/README.md
@@ -0,0 +1,37 @@
+OpenSSL Native Nuget package
+-------------------------
+
+Uses [CoApp](http://coapp.org/) project to build the zlib package.
+
+Prerequisites
+-------------
+Multiple versions of VS installed to be able to build all the targets:
+* Visual Studio 2013
+* Visual Studio 2010 (you might need SP1 to prevent LNK1123 error)
+
+ActivePerl
+
+CoApp toolkit: http://downloads.coapp.org/files/CoApp.Tools.Powershell.msi
+
+More details on installation: http://coapp.org/tutorials/installation.html
+
+Building
+--------
+
+Build all flavors of openssl library using the provided batch file.
+```
+buildall.bat
+```
+
+Then, create NuGet package using powershell (you'll need the CoApp toolkit installed):
+```
+[THIS_DIRECTORY]> Write-NuGetPackage grpc.dependencies.openssl.autopkg
+```
+
+This will create three NuGet packages:
+* the main dev package
+* the redistributable package that contains just the binaries and no headers
+* the symbols package (debug symbols)
+
+Later, you can push the package to NuGet.org repo.
+Attention: before pusing the resulting nuget package to public nuget repo, you have to be 100% sure it works correctly - theres no way how to delete or update an already existing package.
\ No newline at end of file
diff --git a/vsprojects/coapp/openssl/buildall.bat b/vsprojects/coapp/openssl/buildall.bat
new file mode 100644
index 0000000..70a7d16
--- /dev/null
+++ b/vsprojects/coapp/openssl/buildall.bat
@@ -0,0 +1,59 @@
+
+rem Restore using NuGet dependencies (Download NuGet from nuget.org and put it in this directory first)
+nuget restore || goto eof:
+
+
+setlocal
+rem First do a bit of hacking to make sure we have headers ready in openssl's inc32 directory
+cd ..\..\..\third_party\openssl
+call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
+perl Configure no-asm VC-WIN32 || goto :eof
+perl util\mkfiles.pl >MINFO || goto :eof
+perl util\mk1mf.pl no-asm VC-WIN32 >ms\nt.mak || goto :eof
+mkdir inc32\openssl
+mkdir tmp32
+nmake -f ms\nt.mak headers || goto :eof
+endlocal
+
+setlocal
+call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
+call :build x64 Release v120 || goto :eof
+call :build x64 Debug v120 || goto :eof
+endlocal
+
+setlocal
+call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
+call :build Win32 Release v120 || goto :eof
+call :build Win32 Debug v120 || goto :eof
+endlocal
+
+rem setlocal
+rem call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" amd64
+rem call :build x64 Release v110 || goto :eof
+rem call :build x64 Debug v110 || goto :eof
+rem endlocal
+
+rem setlocal
+rem call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
+rem call :build Win32 Release v110 || goto :eof
+rem call :build Win32 Debug v110 || goto :eof
+rem endlocal
+
+rem setlocal
+rem call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64
+rem call :build x64 Release v100 || goto :eof
+rem call :build x64 Debug v100 || goto :eof
+rem endlocal
+
+setlocal
+call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
+call :build Win32 Release v100 || goto :eof
+call :build Win32 Debug v100 || goto :eof
+endlocal
+
+:build
+msbuild /P:Platform=%1 /P:Configuration=%2 /P:PlatformToolset=%3 /P:UsesConfigurationType=dynamic /P:ConfigurationType=DynamicLibrary .\openssl.sln || goto :eof
+msbuild /P:Platform=%1 /P:Configuration=%2 /P:PlatformToolset=%3 /P:UsesConfigurationType=static /P:ConfigurationType=StaticLibrary .\openssl.sln || goto :eof
+goto :eof
+
+
diff --git a/vsprojects/coapp/openssl/grpc.dependencies.openssl.autopkg b/vsprojects/coapp/openssl/grpc.dependencies.openssl.autopkg
new file mode 100644
index 0000000..00ee825
--- /dev/null
+++ b/vsprojects/coapp/openssl/grpc.dependencies.openssl.autopkg
@@ -0,0 +1,101 @@
+@import @"version.inc";
+
+#define {
+ package-id = "grpc.dependencies.openssl";
+}
+
+nuget {
+ // the nuspec file metadata. Gets created/updated on build
+ nuspec {
+ id = ${package-id};
+ version : ${package-version};
+ title: gRPC Native Dependency: OpenSSL;
+ authors: {Mark J. Cox, Ralf S. Engelschall, Dr. Stephen Henson, Ben Laurie, Garrett Serack, Tim Rogers};
+ owners: {Jan Tattermusch};
+ licenseUrl: "http://www.openssl.org/source/license.html";
+ projectUrl: "http://github.com/grpc/grpc";
+ iconUrl: "http://openssl.com/images/openssl-logo.png";
+ requireLicenseAcceptance:false;
+ summary: "An OpenSSL library";
+ description: @"Native OpenSSL library.
+ OpenSSL homepage: http://www.openssl.org";
+ releaseNotes: "Release of OpenSSL 1.0.2a libraries.";
+ copyright: Copyright 2015;
+ tags: { openssl, native, CoApp };
+
+ };
+
+ dependencies {
+ packages : {
+ grpc.dependencies.zlib/1.2.8.9
+ };
+ }
+
+ // the files that go into the content folders
+ // (inserted into the nuspec file)
+ files {
+
+ // .targets file that are applied when redist package is installed from a managed project.
+ managed_build: {
+ #output {
+ package = redist;
+ };
+ #destination = \build\portable-net45;
+ "managed_targets\${package-id}.redist.targets";
+ "managed_targets\${package-id}.redist.props";
+ };
+
+ nestedInclude: {
+ #destination = "${d_include}\openssl";
+ #excludes : { ..\..\..\third_party\openssl\inc32\openssl\opensslconf.h };
+ "..\..\..\third_party\openssl\inc32\openssl\*";
+ };
+
+ // TODO(jtattermusch): Visual Studio 2010 and 2012 Express (v100 and v110 toolsets) don't support x64,
+ // so while generating the package, you will get a warning that corresponding files are missing
+ // (and the resulting package will be somewhat incomplete).
+ ("v100,v120", "Win32,x64", "release,debug", "Dynamic,Static") => {
+ [${0},${1},${2},${3}] {
+ lib: { .\output\${0}\${1}\${2}\${3}\libeay32.lib;
+ .\output\${0}\${1}\${2}\${3}\ssleay32.lib };
+
+ source: {
+ #destination = ${d_src}\openssl;
+ .\output\${0}\${1}\${2}\${3}\include\openssl\opensslconf.h
+ };
+ };
+ };
+ ("v100,v120", "Win32,x64", "release,debug", "Dynamic") => {
+ [${0},${1},${2},${3}] {
+ bin: { .\output\${0}\${1}\${2}\${3}\libeay32.dll;
+ .\output\${0}\${1}\${2}\${3}\ssleay32.dll };
+ symbols: { .\output\${0}\${1}\${2}\${3}\libeay32.pdb;
+ .\output\${0}\${1}\${2}\${3}\ssleay32.pdb };
+ };
+ };
+
+ };
+
+ // the VC++ .props file that gets generated and inserted into the ${d_content} folder
+ props {
+ PropertyGroup {
+ CallingConvention-zlib = cdecl;
+ }
+
+ };
+
+ // the VC++ .targets file that gets generated and inserted into the ${d_content} folder
+ targets {
+ // every configuration needs to reference the include directories.
+ Includes += ${pkg_root}${d_include};
+ // Defines += HAS_ZLIB;
+
+ ("v100,v110,v120", "Win32,x64", "release,debug", "Dynamic,Static") => {
+ [${0},${1},${2},${3}] {
+ Includes += ${pkg_root}${d_include};
+ };
+ };
+
+ };
+}
+
diff --git a/vsprojects/coapp/openssl/libeay32.vcxproj b/vsprojects/coapp/openssl/libeay32.vcxproj
new file mode 100644
index 0000000..0ee9726
--- /dev/null
+++ b/vsprojects/coapp/openssl/libeay32.vcxproj
@@ -0,0 +1,828 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup>
+ <OpenSslPath>..\..\..\third_party\openssl</OpenSslPath>
+ </PropertyGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{BE42CA67-7C48-4882-BE59-111CB41142BE}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>$(LibName)</RootNamespace>
+ <RestorePackages>true</RestorePackages>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Label="ConfigurationSettings">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ <CallingConvention>Cdecl</CallingConvention>
+ <NoASM>true</NoASM>
+ <OutputPath>output\$(PlatformToolset)\$(Platform)\$(Configuration)\$(UsesConfigurationType)\</OutputPath>
+ <OutDir>$(OutputPath)</OutDir>
+ </PropertyGroup>
+ <Import Project="$(CoAppEtcDirectory)vcxproj.inc" Condition="Exists('$(CoAppEtcDirectory)vcxproj.inc')" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <Import Condition="exists('.\packages\grpc.dependencies.zlib.1.2.8.9\build\native\grpc.dependencies.zlib.props')" Project=".\packages\grpc.dependencies.zlib.1.2.8.9\build\native\grpc.dependencies.zlib.props" />
+ <Import Condition="exists('.\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\native\grpc.dependencies.zlib.redist.props')" Project=".\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\native\grpc.dependencies.zlib.redist.props" />
+ <ImportGroup Label="ExtensionSettings" />
+ <ImportGroup Label="PropertySheets">
+ <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <LinkIncremental Condition="'$(Configuration)'=='Release'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)'=='Debug'">true</LinkIncremental>
+ <CallingConvention-zlib>$(CallingConvention)</CallingConvention-zlib>
+ <Linkage-zlib>$(UsesConfigurationType)</Linkage-zlib>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(OpenSslPath);$(OpenSslPath)\inc32;$(OpenSslPath)\crypto;$(OpenSslPath)\crypto\asn1;$(OpenSslPath)\crypto\evp;$(OpenSslPath)\crypto\md2;$(OpenSslPath)\crypto\modes;$(OpenSslPath)\crypto\store;$(OpenSslPath)\include;$(OutDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;L_ENDIAN;MK1MF_BUILD;WIN32_LEAN_AND_MEAN;OPENSSL_THREADS;ZLIB;OPENSSL_SYSNAME_WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>OPENSSL_BUILD_SHLIBCRYPTO;OPENSSL_NO_IDEA;OPENSSL_NO_RC5;OPENSSL_NO_MD2;OPENSSL_NO_KRB5;OPENSSL_NO_JPAKE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>DSO_WIN32;UNICODE;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(ConfigurationType)'=='DynamicLibrary'">_WINDLL;_REENTRANT;OPENSSL_NO_STATIC_ENGINE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(ConfigurationType)'=='StaticLibrary'">OPENSSL_NO_DYNAMIC_ENGINE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Linkage-zlib)'=='dynamic'">ZLIB_SHARED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(NoASM)'=='true'">OPENSSL_NO_ASM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <CallingConvention>%(CallingConvention)</CallingConvention>
+ <StringPooling>true</StringPooling>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TreatWarningAsError>false</TreatWarningAsError>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>zlib$(OutNameSuffix).lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ </Lib>
+ <Link>
+ <AllowIsolation>true</AllowIsolation>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <AdditionalDependencies>ws2_32.lib;crypt32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <ModuleDefinitionFile>.\libeay32.def</ModuleDefinitionFile>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>$(OpenSslPath);$(OpenSslPath)\inc32;$(OpenSslPath)\crypto;$(OpenSslPath)\crypto\asn1;$(OpenSslPath)\crypto\evp;$(OpenSslPath)\crypto\md2;$(OpenSslPath)\crypto\modes;$(OpenSslPath)\crypto\store;$(OpenSslPath)\include;$(OutDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;L_ENDIAN;MK1MF_BUILD;WIN32_LEAN_AND_MEAN;OPENSSL_THREADS;ZLIB;OPENSSL_SYSNAME_WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>OPENSSL_BUILD_SHLIBCRYPTO;OPENSSL_NO_IDEA;OPENSSL_NO_RC5;OPENSSL_NO_MD2;OPENSSL_NO_KRB5;OPENSSL_NO_JPAKE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>DSO_WIN32;UNICODE;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(ConfigurationType)'=='DynamicLibrary'">_WINDLL;_REENTRANT;OPENSSL_NO_STATIC_ENGINE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(ConfigurationType)'=='StaticLibrary'">OPENSSL_NO_DYNAMIC_ENGINE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Linkage-zlib)'=='dynamic'">ZLIB_SHARED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>OPENSSL_NO_ASM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>CRYPTO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
+ <ClCompile>
+ <AdditionalOptions>/Gs0 %(AdditionalOptions)</AdditionalOptions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <OmitFramePointers>false</OmitFramePointers>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>DEBUG;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>DEBUG;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
+ <ClCompile>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <ExceptionHandling>false</ExceptionHandling>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <OmitFramePointers>true</OmitFramePointers>
+ <Optimization>Full</Optimization>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </ClCompile>
+ <Link>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ <ResourceCompile>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MultiThreadedDebug</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MultiThreadedDebug</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <None Include="openssl.gyp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="$(OpenSslPath)\ms\uplink.c" >
+ <ExcludedFromBuild>true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(OpenSslPath)\crypto\cversion.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ex_data.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\mem_clr.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\mem_dbg.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\o_dir.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\o_fips.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\o_time.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cryptlib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\o_str.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\uid.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ebcdic.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\mem.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\o_init.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\fips_ers.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cpt_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\krb5\krb5_asn.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rand\rand_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rand\rand_os2.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rand\rand_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rand\rand_win.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rand\rand_egd.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rand\rand_nw.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rand\randfile.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rand\rand_unix.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rand\md_rand.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_skey.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_sxnet.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_ocsp.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_ncons.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\pcy_node.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_bcons.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_pci.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\pcy_data.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_ia5.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_utl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_cpols.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_conf.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_akeya.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_pku.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_addr.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_int.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\pcy_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_pcons.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_genn.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_purp.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\pcy_tree.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_enum.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_pmaps.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_alt.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_bitst.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_crld.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\pcy_map.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_info.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_asid.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_prn.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_akey.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_pcia.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\pcy_cache.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_extku.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509v3\v3_scts.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\txt_db\txt_db.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ecdh\ech_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ecdh\ech_key.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ecdh\ech_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ecdh\ech_ossl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ecdh\ech_kdf.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\idea\i_cfb64.c" >
+ <ExcludedFromBuild>true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(OpenSslPath)\crypto\idea\i_skey.c" >
+ <ExcludedFromBuild>true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(OpenSslPath)\crypto\idea\i_cbc.c" >
+ <ExcludedFromBuild>true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(OpenSslPath)\crypto\idea\i_ofb64.c" >
+ <ExcludedFromBuild>true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(OpenSslPath)\crypto\idea\i_ecb.c" >
+ <ExcludedFromBuild>true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs12\p12_attr.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs12\p12_asn.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs12\p12_utl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs12\p12_add.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs12\p12_crt.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs12\p12_key.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs12\p12_crpt.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs12\p12_p8d.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs12\pk12err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs12\p12_decr.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs12\p12_mutl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs12\p12_kiss.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs12\p12_p8e.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs12\p12_init.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs12\p12_npas.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\seed\seed_ecb.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\seed\seed_cbc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\seed\seed_ofb.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\seed\seed.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\seed\seed_cfb.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\conf\conf_mod.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\conf\conf_def.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\conf\conf_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\conf\conf_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\conf\conf_mall.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\conf\conf_sap.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\conf\conf_api.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ocsp\ocsp_ext.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ocsp\ocsp_asn.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ocsp\ocsp_cl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ocsp\ocsp_vfy.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ocsp\ocsp_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ocsp\ocsp_srv.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ocsp\ocsp_ht.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ocsp\ocsp_prn.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ocsp\ocsp_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\sha\sha256.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\sha\sha1_one.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\sha\sha512.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\sha\sha1dgst.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\sha\sha_dgst.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\sha\sha_one.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\mdc2\mdc2dgst.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\mdc2\mdc2_one.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\camellia\cmll_ctr.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\camellia\cmll_misc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\camellia\cmll_cfb.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\camellia\cmll_ofb.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\camellia\cmll_ecb.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\camellia\camellia.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\camellia\cmll_utl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\camellia\cmll_cbc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ts\ts_req_utils.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ts\ts_rsp_verify.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ts\ts_rsp_print.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ts\ts_rsp_sign.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ts\ts_conf.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ts\ts_verify_ctx.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ts\ts_asn1.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ts\ts_rsp_utils.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ts\ts_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ts\ts_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ts\ts_req_print.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\evp_asn1.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\x_sig.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\n_pkey.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_object.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\d2i_pr.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\tasn_new.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\x_attrib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\x_info.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\t_spki.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\x_long.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_time.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\tasn_typ.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\asn1_gen.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_utctm.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\tasn_prn.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\x_bignum.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_bool.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\t_bitst.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\asn_pack.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\x_algor.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\t_crl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\x_pkey.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_bytes.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\t_req.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_set.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\bio_asn1.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_utf8.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\asn1_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\asn_mime.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\x_x509.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_enum.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_strex.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_sign.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_int.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_strnid.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\nsseq.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\i2d_pu.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\tasn_dec.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\p5_pbe.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_dup.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\x_nx509.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\t_pkey.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\x_exten.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\x_x509a.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_octet.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\p8_pkey.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_mbstr.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\f_string.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\d2i_pu.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\tasn_fre.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\x_crl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_digest.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\f_int.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_i2d_fp.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\asn1_par.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\f_enum.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\t_x509a.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_d2i_fp.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\tasn_utl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_gentm.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\ameth_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\asn1_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_bitstr.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_print.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\x_req.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\p5_pbev2.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_type.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\x_spki.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\bio_ndef.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\a_verify.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\x_pubkey.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\x_name.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\i2d_pr.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\asn_moid.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\tasn_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\x_val.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\asn1\t_x509.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pem\pem_pk8.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pem\pem_info.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pem\pem_seal.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pem\pem_x509.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pem\pem_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pem\pem_oth.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pem\pem_all.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pem\pem_pkey.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pem\pem_xaux.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pem\pvkfmt.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pem\pem_sign.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pem\pem_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\lhash\lh_stats.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\lhash\lhash.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ecdsa\ecs_sign.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ecdsa\ecs_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ecdsa\ecs_ossl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ecdsa\ecs_asn1.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ecdsa\ecs_vrf.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ecdsa\ecs_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\store\str_err.c">
+ <ExcludedFromBuild>true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(OpenSslPath)\crypto\store\str_mem.c">
+ <ExcludedFromBuild>true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(OpenSslPath)\crypto\store\str_lib.c">
+ <ExcludedFromBuild>true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(OpenSslPath)\crypto\store\str_meth.c">
+ <ExcludedFromBuild>true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(OpenSslPath)\crypto\dsa\dsa_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dsa\dsa_asn1.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dsa\dsa_key.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dsa\dsa_gen.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dsa\dsa_pmeth.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dsa\dsa_vrf.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dsa\dsa_ossl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dsa\dsa_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dsa\dsa_ameth.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dsa\dsa_prn.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dsa\dsa_depr.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dsa\dsa_sign.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\eng_openssl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\eng_list.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\tb_rsa.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\tb_cipher.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\tb_asnmth.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\eng_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\eng_ctrl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\tb_dh.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\eng_cryptodev.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\eng_table.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\eng_dyn.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\eng_pkey.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\tb_dsa.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\eng_fat.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\tb_store.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\tb_digest.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\eng_init.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\tb_pkmeth.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\eng_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\tb_rand.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\eng_all.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\tb_ecdh.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\eng_rdrand.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\eng_cnf.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\engine\tb_ecdsa.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\bio_cb.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\b_print.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\bss_bio.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\bss_sock.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\bf_buff.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\bss_mem.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\bf_null.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\bss_acpt.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\bss_file.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\bio_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\bio_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\bss_null.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\bss_log.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\b_sock.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\bss_fd.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\b_dump.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\bf_nbio.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\bss_dgram.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bio\bss_conn.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bf\bf_ecb.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bf\bf_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bf\bf_skey.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bf\bf_cfb64.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bf\bf_ofb64.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\whrlpool\wp_dgst.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\whrlpool\wp_block.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dh\dh_ameth.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dh\dh_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dh\dh_depr.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dh\dh_check.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dh\dh_key.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dh\dh_asn1.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dh\dh_pmeth.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dh\dh_prn.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dh\dh_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dh\dh_gen.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dh\dh_kdf.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dh\dh_rfc5114.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509_req.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509_txt.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\by_file.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509_obj.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509_vpm.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509_d2.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509_set.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509spki.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x_all.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509type.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509_def.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509_vfy.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509_cmp.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509_att.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509_v3.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509_lu.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509_ext.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509_r2x.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509rset.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\by_dir.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509name.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509_trs.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\x509\x509cset.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\comp\comp_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\comp\c_zlib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\comp\c_rle.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\comp\comp_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_gf2m.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_add.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_blind.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_kron.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_nist.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_gcd.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_word.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_mont.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_mod.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_exp2.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_exp.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_print.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_prime.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_mpi.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_sqrt.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_mul.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_asm.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_x931p.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_recp.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_const.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_ctx.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_shift.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_sqr.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_depr.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_rand.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\bn\bn_div.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_depr.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_pk1.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_pmeth.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_ssl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_crpt.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_asn1.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_saos.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_gen.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_pss.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_none.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_null.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_x931.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_eay.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_sign.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_ameth.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_oaep.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_chk.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rsa\rsa_prn.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pqueue\pqueue.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\objects\o_names.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\objects\obj_xref.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\objects\obj_dat.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\objects\obj_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\objects\obj_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\buffer\buffer.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\buffer\buf_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\buffer\buf_str.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ecp_oct.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ecp_nistp224.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ecp_nist.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ecp_nistp256.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ec_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ec2_mult.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ec_key.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ec_curve.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ec_ameth.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\eck_prn.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ec_oct.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ec2_smpl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ec_check.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ec2_oct.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ecp_smpl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ec_asn1.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ecp_nistputil.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ec_cvt.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ec_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ec_pmeth.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ec_mult.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ecp_mont.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ecp_nistp521.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ec\ec_print.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\md2\md2_dgst.c">
+ <ExcludedFromBuild>true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(OpenSslPath)\crypto\md2\md2_one.c">
+ <ExcludedFromBuild>true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(OpenSslPath)\crypto\dso\dso_vms.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dso\dso_beos.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dso\dso_dl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dso\dso_null.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dso\dso_openssl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dso\dso_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dso\dso_dlfcn.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dso\dso_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\dso\dso_win32.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\stack\stack.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\md4\md4_dgst.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\md4\md4_one.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\md5\md5_one.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\md5\md5_dgst.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cmac\cm_ameth.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cmac\cm_pmeth.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cmac\cmac.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\aes\aes_wrap.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\aes\aes_cbc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\aes\aes_ige.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\aes\aes_ecb.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\aes\aes_cfb.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\aes\aes_ctr.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\aes\aes_misc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\aes\aes_ofb.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\aes\aes_core.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ripemd\rmd_dgst.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ripemd\rmd_one.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\modes\cbc128.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\modes\xts128.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\modes\ofb128.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\modes\ccm128.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\modes\cfb128.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\modes\ctr128.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\modes\cts128.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\modes\gcm128.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\modes\wrap128.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\err\err_all.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\err\err_prn.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\err\err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rc4\rc4_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rc4\rc4_skey.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rc4\rc4_utl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\set_key.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\des_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\cfb64enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\cbc_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\ofb_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\enc_writ.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\fcrypt_b.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\read2pwd.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\rpc_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\fcrypt.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\ecb3_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\cbc_cksm.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\cfb_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\xcbc_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\ecb_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\enc_read.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\des_old.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\ofb64ede.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\str2key.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\cfb64ede.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\ofb64enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\des_old2.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\pcbc_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\qud_cksm.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\rand_key.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\des\ede_cbcm_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rc2\rc2ofb64.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rc2\rc2cfb64.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rc2\rc2_cbc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rc2\rc2_ecb.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\rc2\rc2_skey.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs7\pk7_asn1.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs7\pkcs7err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs7\pk7_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs7\pk7_mime.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs7\pk7_attr.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs7\pk7_smime.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs7\bio_pk7.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\pkcs7\pk7_doit.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cast\c_ofb64.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cast\c_skey.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cast\c_cfb64.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cast\c_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cast\c_ecb.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\srp\srp_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\srp\srp_vfy.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ui\ui_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ui\ui_compat.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ui\ui_util.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ui\ui_openssl.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\ui\ui_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\bio_b64.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\evp_cnf.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\m_wp.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\evp_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\bio_ok.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\m_dss1.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\p_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\m_md4.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\e_bf.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\e_rc4_hmac_md5.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\p_sign.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\c_all.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\p_seal.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\evp_pkey.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\m_ecdsa.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\e_aes_cbc_hmac_sha1.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\m_sha.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\p5_crpt2.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\e_seed.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\m_sha1.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\e_old.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\m_dss.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\e_cast.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\e_des.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\m_ripemd.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\pmeth_gn.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\e_null.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\e_des3.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\e_rc2.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\e_rc4.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\bio_md.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\m_md5.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\p_open.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\m_mdc2.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\evp_pbe.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\c_allc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\p5_crpt.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\p_verify.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\m_null.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\evp_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\evp_acnf.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\e_xcbc_d.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\names.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\e_idea.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\encode.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\e_camellia.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\m_sigver.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\evp_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\p_dec.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\bio_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\digest.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\evp_key.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\e_aes.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\p_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\pmeth_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\m_md2.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\c_alld.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\e_rc5.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\e_aes_cbc_hmac_sha256.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\evp\pmeth_fn.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cms\cms_io.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cms\cms_cd.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cms\cms_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cms\cms_att.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cms\cms_asn1.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cms\cms_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cms\cms_env.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cms\cms_smime.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cms\cms_dd.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cms\cms_pwri.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cms\cms_ess.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cms\cms_sd.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cms\cms_err.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\cms\cms_kari.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\hmac\hm_pmeth.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\hmac\hmac.c" />
+ <ClCompile Include="$(OpenSslPath)\crypto\hmac\hm_ameth.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="$(OpenSslPath)\ms\version32.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <Import Condition="exists('.\packages\grpc.dependencies.zlib.1.2.8.9\build\native\grpc.dependencies.zlib.targets')" Project=".\packages\grpc.dependencies.zlib.1.2.8.9\build\native\grpc.dependencies.zlib.targets" />
+ <Import Condition="exists('.\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\native\grpc.dependencies.zlib.redist.targets')" Project=".\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\native\grpc.dependencies.zlib.redist.targets" />
+ <ImportGroup Label="ExtensionTargets" />
+ <PropertyGroup>
+ <Build-Perl-zlib Condition="'$(Linkage-zlib)'=='dynamic'">zlib-dynamic</Build-Perl-zlib>
+ <Build-Perl-zlib Condition="'$(Linkage-zlib)'=='static'">zlib</Build-Perl-zlib>
+ <Build-Perl-asm Condition="'$(NoASM)'=='true'">no-asm</Build-Perl-asm>
+ <Build-Perl-asm Condition="'$(NoASM)'=='false'"></Build-Perl-asm>
+ <Build-Perl-platform Condition="'$(Platform)'=='Win32'">VC-WIN32</Build-Perl-platform>
+ <Build-Perl-platform Condition="'$(Platform)'=='x64'">VC-WIN64A</Build-Perl-platform>
+ <Build-Perl-dll Condition="'$(ConfigurationType)'=='DynamicLibrary'">shared</Build-Perl-dll>
+ <Build-Perl-dll Condition="'$(ConfigurationType)'=='StaticLibrary'">no-shared</Build-Perl-dll>
+ </PropertyGroup>
+ <Target Name="PerlDefs">
+ <Exec
+ Command="
+ perl Configure no-rc5 no-idea enable-mdc2 threads $(Build-Perl-zlib) $(Build-Perl-dll) $(Build-Perl-asm) $(Build-Perl-platform)
+ perl util\mkfiles.pl >MINFO
+ perl .\util\mkdef.pl 32 libeay >..\..\vsprojects\coapp\openssl\libeay32.def
+ "
+ WorkingDirectory="$(MSBuildThisFileDirectory)$(OpenSslPath)\" />
+ <Copy
+ SourceFiles="$(MSBuildThisFileDirectory)$(OpenSslPath)\crypto\opensslconf.h"
+ DestinationFolder="$(OutDir)Include\openssl\" />
+ </Target>
+ <PropertyGroup>
+ <AA1 Condition="( $(PlatformToolset.ToLower().IndexOf('v110')) > -1 Or '$(PlatformToolset.ToLower())' == 'windowskernelmodedriver8.0' Or '$(PlatformToolset.ToLower())' == 'windowsapplicationfordrivers8.0' Or '$(PlatformToolset.ToLower())' == 'windowsusermodedriver8.0' )">true</AA1>
+ <AA2 Condition="'$(Platform.ToLower())' == 'win32'">true</AA2>
+ <AA3 Condition="( $(Configuration.ToLower().IndexOf('debug')) == -1 )">true</AA3>
+ <AA4 Condition="'$(Linkage-zlib.ToLower())' == 'dynamic'">true</AA4>
+ <AA5 Condition="'$(CallingConvention-zlib.ToLower())' == 'cdecl'">true</AA5>
+ </PropertyGroup>
+ <Target Name="Info2" BeforeTargets="Build">
+ <Message Text="*******************************************************************************" Importance="high" />
+ <Message Text="* PlatformToolset : '$(AA1)'" Importance="high" />
+ <Message Text="* Platform : '$(AA2)'" Importance="high" />
+ <Message Text="* Configuration : '$(AA3)'" Importance="high" />
+ <Message Text="* Linkage : '$(AA4)'" Importance="high" />
+ <Message Text="* CallingConv : '$(AA5)'" Importance="high" />
+ <Message Text="*******************************************************************************" Importance="high" />
+ <MakeDir Directories="$(OutDir);$(IntDir);$(TargetDir)"/>
+ </Target>
+ <PropertyGroup>
+ <BuildDependsOn>Info2;PerlDefs;$(BuildDependsOn)</BuildDependsOn>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/vsprojects/coapp/openssl/managed_targets/grpc.dependencies.openssl.redist.props b/vsprojects/coapp/openssl/managed_targets/grpc.dependencies.openssl.redist.props
new file mode 100644
index 0000000..63d23be
--- /dev/null
+++ b/vsprojects/coapp/openssl/managed_targets/grpc.dependencies.openssl.redist.props
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <!-- Whether or not copy native dependencies to output directory after building -->
+ <CopyNativeDependencies Condition=" '$(CopyNativeDependencies)' == '' ">true</CopyNativeDependencies>
+
+ <!-- Set defaults for native dependencies if not already set. Properties can be overriden in the project files. -->
+ <NativeDependenciesToolset Condition=" '$(NativeDependenciesToolset)' == '' ">v120</NativeDependenciesToolset>
+ <NativeDependenciesPlatform Condition=" '$(NativeDependenciesPlatform)' == '' ">Win32</NativeDependenciesPlatform>
+ <NativeDependenciesConfiguration Condition=" '$(NativeDependenciesConfiguration)' == '' ">Debug</NativeDependenciesConfiguration>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/vsprojects/coapp/openssl/managed_targets/grpc.dependencies.openssl.redist.targets b/vsprojects/coapp/openssl/managed_targets/grpc.dependencies.openssl.redist.targets
new file mode 100644
index 0000000..1eb63f3
--- /dev/null
+++ b/vsprojects/coapp/openssl/managed_targets/grpc.dependencies.openssl.redist.targets
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Choose>
+ <!-- Under older versions of Monodevelop, Choose is not supported and is just ignored, which gives us the desired effect. -->
+ <When Condition=" '$(OS)' != 'Unix' ">
+ <ItemGroup Condition=" '$(CopyNativeDependencies)' == 'true' ">
+ <Content Include="$(MSBuildThisFileDirectory)..\..\build\native\bin\$(NativeDependenciesToolset)\$(NativeDependenciesPlatform)\$(NativeDependenciesConfiguration)\dynamic\libeay32.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="$(MSBuildThisFileDirectory)..\..\build\native\bin\$(NativeDependenciesToolset)\$(NativeDependenciesPlatform)\$(NativeDependenciesConfiguration)\dynamic\ssleay32.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ </ItemGroup>
+ </When>
+ <Otherwise />
+ </Choose>
+</Project>
\ No newline at end of file
diff --git a/vsprojects/coapp/openssl/openssl.sln b/vsprojects/coapp/openssl/openssl.sln
new file mode 100644
index 0000000..7825f18
--- /dev/null
+++ b/vsprojects/coapp/openssl/openssl.sln
@@ -0,0 +1,39 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libeay32", "libeay32.vcxproj", "{BE42CA67-7C48-4882-BE59-111CB41142BE}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssleay32", "ssleay32.vcxproj", "{7E05608D-A775-418F-946A-E9A0B84C6DFF}"
+ ProjectSection(ProjectDependencies) = postProject
+ {BE42CA67-7C48-4882-BE59-111CB41142BE} = {BE42CA67-7C48-4882-BE59-111CB41142BE}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {BE42CA67-7C48-4882-BE59-111CB41142BE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BE42CA67-7C48-4882-BE59-111CB41142BE}.Debug|Win32.Build.0 = Debug|Win32
+ {BE42CA67-7C48-4882-BE59-111CB41142BE}.Debug|x64.ActiveCfg = Debug|x64
+ {BE42CA67-7C48-4882-BE59-111CB41142BE}.Debug|x64.Build.0 = Debug|x64
+ {BE42CA67-7C48-4882-BE59-111CB41142BE}.Release|Win32.ActiveCfg = Release|Win32
+ {BE42CA67-7C48-4882-BE59-111CB41142BE}.Release|Win32.Build.0 = Release|Win32
+ {BE42CA67-7C48-4882-BE59-111CB41142BE}.Release|x64.ActiveCfg = Release|x64
+ {BE42CA67-7C48-4882-BE59-111CB41142BE}.Release|x64.Build.0 = Release|x64
+ {7E05608D-A775-418F-946A-E9A0B84C6DFF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7E05608D-A775-418F-946A-E9A0B84C6DFF}.Debug|Win32.Build.0 = Debug|Win32
+ {7E05608D-A775-418F-946A-E9A0B84C6DFF}.Debug|x64.ActiveCfg = Debug|x64
+ {7E05608D-A775-418F-946A-E9A0B84C6DFF}.Debug|x64.Build.0 = Debug|x64
+ {7E05608D-A775-418F-946A-E9A0B84C6DFF}.Release|Win32.ActiveCfg = Release|Win32
+ {7E05608D-A775-418F-946A-E9A0B84C6DFF}.Release|Win32.Build.0 = Release|Win32
+ {7E05608D-A775-418F-946A-E9A0B84C6DFF}.Release|x64.ActiveCfg = Release|x64
+ {7E05608D-A775-418F-946A-E9A0B84C6DFF}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/vsprojects/coapp/openssl/packages.config b/vsprojects/coapp/openssl/packages.config
new file mode 100644
index 0000000..e1f8f36
--- /dev/null
+++ b/vsprojects/coapp/openssl/packages.config
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="grpc.dependencies.zlib" version="1.2.8.9" targetFramework="Native" />
+ <package id="grpc.dependencies.zlib.redist" version="1.2.8.9" targetFramework="Native" />
+</packages>
\ No newline at end of file
diff --git a/vsprojects/coapp/openssl/ssleay32.vcxproj b/vsprojects/coapp/openssl/ssleay32.vcxproj
new file mode 100644
index 0000000..4cc2436
--- /dev/null
+++ b/vsprojects/coapp/openssl/ssleay32.vcxproj
@@ -0,0 +1,240 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup>
+ <OpenSslPath>..\..\..\third_party\openssl</OpenSslPath>
+ </PropertyGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{7E05608D-A775-418F-946A-E9A0B84C6DFF}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>$(LibName)</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Label="ConfigurationSettings">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ <CallingConvention>Cdecl</CallingConvention>
+ <OutputPath>output\$(PlatformToolset)\$(Platform)\$(Configuration)\$(UsesConfigurationType)\</OutputPath>
+ <OutDir>$(OutputPath)</OutDir>
+ </PropertyGroup>
+ <Import Project="$(CoAppEtcDirectory)vcxproj.inc" Condition="Exists('$(CoAppEtcDirectory)vcxproj.inc')" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <Import Condition="exists('.\packages\grpc.dependencies.zlib.1.2.8.9\build\native\grpc.dependencies.zlib.props')" Project=".\packages\grpc.dependencies.zlib.1.2.8.9\build\native\grpc.dependencies.zlib.props" />
+ <Import Condition="exists('.\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\native\grpc.dependencies.zlib.redist.props')" Project=".\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\native\grpc.dependencies.zlib.redist.props" />
+ <ImportGroup Label="ExtensionSettings" />
+ <ImportGroup Label="PropertySheets">
+ <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <LinkIncremental Condition="'$(Configuration)'=='Release'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)'=='Debug'">true</LinkIncremental>
+ <CallingConvention-zlib>$(CallingConvention)</CallingConvention-zlib>
+ <Linkage-zlib>$(UsesConfigurationType)</Linkage-zlib>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(OpenSslPath);$(OpenSslPath)\inc32;$(OpenSslPath)\crypto;$(OpenSslPath)\include;$(OutDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <!-- <PreprocessorDefinitions>OPENSSL_USE_APPLINK;%(PreprocessorDefinitions)</PreprocessorDefinitions> -->
+ <!-- <PreprocessorDefinitions>BUILDING_V8_SHARED=1;BUILDING_UV_SHARED=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> -->
+ <!-- <PreprocessorDefinitions>OPENSSL_EXPORT_VAR_AS_FUNCTION;PURIFY;%(PreprocessorDefinitions)</PreprocessorDefinitions> -->
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;L_ENDIAN;MK1MF_BUILD;WIN32_LEAN_AND_MEAN;OPENSSL_THREADS;ZLIB;OPENSSL_SYSNAME_WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>OPENSSL_BUILD_SHLIBSSL;OPENSSL_NO_IDEA;OPENSSL_NO_RC5;OPENSSL_NO_MD2;OPENSSL_NO_KRB5;OPENSSL_NO_JPAKE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>DSO_WIN32;UNICODE;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(ConfigurationType)'=='DynamicLibrary'">_WINDLL;_REENTRANT;OPENSSL_NO_STATIC_ENGINE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(ConfigurationType)'=='StaticLibrary'">OPENSSL_NO_DYNAMIC_ENGINE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Linkage-zlib)'=='dynamic'">ZLIB_SHARED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>OPENSSL_NO_ASM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <CallingConvention>%(CallingConvention)</CallingConvention>
+ <StringPooling>true</StringPooling>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TreatWarningAsError>false</TreatWarningAsError>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <!--
+ <IgnoreSpecificDefaultLibraries>zlib$(OutNameSuffix).lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ -->
+ </Lib>
+ <Link>
+ <AllowIsolation>true</AllowIsolation>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <AdditionalDependencies>ws2_32.lib;crypt32.lib;libeay32$(OutNameSuffix).lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>.\ssleay32.def</ModuleDefinitionFile>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>$(OpenSslPath);$(OpenSslPath)\inc32;$(OpenSslPath)\crypto;$(OpenSslPath)\include;$(OutDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;L_ENDIAN;MK1MF_BUILD;WIN32_LEAN_AND_MEAN;OPENSSL_THREADS;ZLIB;OPENSSL_SYSNAME_WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>OPENSSL_BUILD_SHLIBSSL;OPENSSL_NO_IDEA;OPENSSL_NO_RC5;OPENSSL_NO_MD2;OPENSSL_NO_KRB5;OPENSSL_NO_JPAKE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>DSO_WIN32;UNICODE;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(ConfigurationType)'=='DynamicLibrary'">_WINDLL;_REENTRANT;OPENSSL_NO_STATIC_ENGINE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(ConfigurationType)'=='StaticLibrary'">OPENSSL_NO_DYNAMIC_ENGINE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Linkage-zlib)'=='dynamic'">ZLIB_SHARED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>OPENSSL_NO_ASM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>SSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
+ <ClCompile>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <OmitFramePointers>false</OmitFramePointers>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>DEBUG;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>DEBUG;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
+ <ClCompile>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <ExceptionHandling>false</ExceptionHandling>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <OmitFramePointers>true</OmitFramePointers>
+ <Optimization>Full</Optimization>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </ClCompile>
+ <Link>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ <ResourceCompile>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MultiThreadedDebug</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MultiThreadedDebug</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <None Include="openssl.gyp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="$(OpenSslPath)\ssl\s2_pkt.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s3_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s23_pkt.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\t1_meth.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\ssl_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\ssl_asn1.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s23_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\tls_srp.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\ssl_txt.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\ssl_algs.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s23_srvr.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\d1_both.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s3_meth.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\ssl_err2.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\bio_ssl.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s2_meth.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s3_clnt.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s3_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\kssl.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\t1_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\d1_clnt.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\t1_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\t1_srvr.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\ssl_cert.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\t1_clnt.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\ssl_stat.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\ssl_sess.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s3_both.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\d1_srtp.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\d1_pkt.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s23_clnt.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s2_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\t1_reneg.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s2_enc.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\ssl_rsa.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s23_meth.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\d1_lib.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\ssl_ciph.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s2_srvr.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\ssl_err.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\ssl_utst.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s2_clnt.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s3_pkt.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\d1_srvr.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s3_srvr.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\s3_cbc.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\d1_meth.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\ssl_conf.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\t1_ext.c" />
+ <ClCompile Include="$(OpenSslPath)\ssl\t1_trce.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="$(OpenSslPath)\ms\version32.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <Import Condition="exists('.\packages\grpc.dependencies.zlib.1.2.8.9\build\native\grpc.dependencies.zlib.targets')" Project=".\packages\grpc.dependencies.zlib.1.2.8.9\build\native\grpc.dependencies.zlib.targets" />
+ <Import Condition="exists('.\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\native\grpc.dependencies.zlib.redist.targets')" Project=".\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\native\grpc.dependencies.zlib.redist.targets" />
+ <ImportGroup Label="ExtensionTargets" />
+ <PropertyGroup>
+ <Build-Perl-zlib Condition="'$(Linkage-zlib)'=='dynamic'">zlib-dynamic</Build-Perl-zlib>
+ <Build-Perl-zlib Condition="'$(Linkage-zlib)'=='static'">zlib</Build-Perl-zlib>
+ <Build-Perl-asm Condition="'$(NoASM)'=='true'">no-asm</Build-Perl-asm>
+ <Build-Perl-asm Condition="'$(NoASM)'=='false'"></Build-Perl-asm>
+ <Build-Perl-platform Condition="'$(Platform)'=='Win32'">VC-WIN32</Build-Perl-platform>
+ <Build-Perl-platform Condition="'$(Platform)'=='x64'">VC-WIN64A</Build-Perl-platform>
+ <Build-Perl-dll Condition="'$(ConfigurationType)'=='DynamicLibrary'">shared</Build-Perl-dll>
+ <Build-Perl-dll Condition="'$(ConfigurationType)'=='StaticLibrary'">no-shared</Build-Perl-dll>
+ </PropertyGroup>
+ <Target Name="PerlDefs">
+ <Exec
+ Command="
+ perl Configure no-rc5 no-idea enable-mdc2 threads $(Build-Perl-zlib) $(Build-Perl-dll) $(Build-Perl-asm) $(Build-Perl-platform)
+ perl util\mkfiles.pl >MINFO
+ perl .\util\mkdef.pl 32 ssleay >..\..\vsprojects\coapp\openssl\ssleay32.def
+ "
+ WorkingDirectory="$(MSBuildThisFileDirectory)$(OpenSslPath)\" />
+ </Target>
+ <PropertyGroup>
+ <BuildDependsOn>PerlDefs;$(BuildDependsOn)</BuildDependsOn>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/vsprojects/coapp/openssl/version.inc b/vsprojects/coapp/openssl/version.inc
new file mode 100644
index 0000000..f27552b
--- /dev/null
+++ b/vsprojects/coapp/openssl/version.inc
@@ -0,0 +1 @@
+#define { package-version: 1.0.2.2; }
diff --git a/vsprojects/coapp/zlib/grpc.dependencies.zlib.autopkg b/vsprojects/coapp/zlib/grpc.dependencies.zlib.autopkg
index 01390b9..da0455d 100644
--- a/vsprojects/coapp/zlib/grpc.dependencies.zlib.autopkg
+++ b/vsprojects/coapp/zlib/grpc.dependencies.zlib.autopkg
@@ -16,7 +16,7 @@
authors: {Jean-loup Gailly, Mark Adler, Garrett Serack, Tim Rogers};
owners: {Jan Tattermusch};
licenseUrl: "http://zlib.net/zlib-license.html";
- projectUrl: "http://github.com/jtattermusch/zlib";
+ projectUrl: "http://github.com/grpc/grpc";
iconUrl: "http://zlib.net/images/zlib3d-b1.png";
requireLicenseAcceptance:false;
summary:A zlib library;
diff --git a/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj b/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj
new file mode 100644
index 0000000..a385a6d
--- /dev/null
+++ b/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.1.0.2.3\build\native\grpc.dependencies.openssl.props" Condition="Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.1.0.2.3\build\native\1.0.2.3.props')" />
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{09500BEB-9A09-F52E-9A3D-D1D27D7177F0}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration">
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration">
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration">
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\..\..\vsprojects\cpptest.props" />
+ <Import Project="..\..\..\..\vsprojects\global.props" />
+ <Import Project="..\..\..\..\vsprojects\openssl.props" />
+ <Import Project="..\..\..\..\vsprojects\protobuf.props" />
+ <Import Project="..\..\..\..\vsprojects\winsock.props" />
+ <Import Project="..\..\..\..\vsprojects\zlib.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)'=='Debug'">
+ <TargetName>stress_test</TargetName>
+ <Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
+ <Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
+ <Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release'">
+ <TargetName>stress_test</TargetName>
+ <Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
+ <Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
+ <Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\..\test\cpp\interop\client_helper.h" />
+ <ClInclude Include="..\..\..\..\test\cpp\interop\interop_client.h" />
+ <ClInclude Include="..\..\..\..\test\cpp\interop\stress_interop_client.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\test\proto\empty.pb.cc">
+ </ClCompile>
+ <ClInclude Include="..\..\..\..\test\proto\empty.pb.h">
+ </ClInclude>
+ <ClCompile Include="..\..\..\..\test\proto\empty.grpc.pb.cc">
+ </ClCompile>
+ <ClInclude Include="..\..\..\..\test\proto\empty.grpc.pb.h">
+ </ClInclude>
+ <ClCompile Include="..\..\..\..\test\proto\messages.pb.cc">
+ </ClCompile>
+ <ClInclude Include="..\..\..\..\test\proto\messages.pb.h">
+ </ClInclude>
+ <ClCompile Include="..\..\..\..\test\proto\messages.grpc.pb.cc">
+ </ClCompile>
+ <ClInclude Include="..\..\..\..\test\proto\messages.grpc.pb.h">
+ </ClInclude>
+ <ClCompile Include="..\..\..\..\test\proto\test.pb.cc">
+ </ClCompile>
+ <ClInclude Include="..\..\..\..\test\proto\test.pb.h">
+ </ClInclude>
+ <ClCompile Include="..\..\..\..\test\proto\test.grpc.pb.cc">
+ </ClCompile>
+ <ClInclude Include="..\..\..\..\test\proto\test.grpc.pb.h">
+ </ClInclude>
+ <ClCompile Include="..\..\..\..\test\cpp\interop\interop_client.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\test\cpp\interop\stress_interop_client.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\test\cpp\interop\stress_test.cc">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\vsprojects\vcxproj\.\grpc++_test_util\grpc++_test_util.vcxproj">
+ <Project>{0BE77741-552A-929B-A497-4EF7ECE17A64}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\vsprojects\vcxproj\.\grpc_test_util\grpc_test_util.vcxproj">
+ <Project>{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\vsprojects\vcxproj\.\grpc++\grpc++.vcxproj">
+ <Project>{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\vsprojects\vcxproj\.\grpc\grpc.vcxproj">
+ <Project>{29D16885-7228-4C31-81ED-5F9187C7F2A9}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\vsprojects\vcxproj\.\gpr_test_util\gpr_test_util.vcxproj">
+ <Project>{EAB0A629-17A9-44DB-B5FF-E91A721FE037}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\vsprojects\vcxproj\.\gpr\gpr.vcxproj">
+ <Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\..\vsprojects\vcxproj\.\grpc++_test_config\grpc++_test_config.vcxproj">
+ <Project>{3F7D093D-11F9-C4BC-BEB7-18EB28E3F290}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ <Import Project="..\..\..\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
+ <Import Project="..\..\..\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.9\build\native\grpc.dependencies.zlib.targets" Condition="Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.9\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
+ <Import Project="..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.2.3\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.2.3\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
+ <Import Project="..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.1.0.2.3\build\native\grpc.dependencies.openssl.targets" Condition="Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.1.0.2.3\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
+ </ImportGroup>
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+ </PropertyGroup>
+ <Error Condition="!Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\native\grpc.dependencies.zlib.redist.targets')" />
+ <Error Condition="!Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.9\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.9\build\native\grpc.dependencies.zlib.targets')" />
+ <Error Condition="!Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.2.3\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.2.3\build\native\grpc.dependencies.openssl.redist.targets')" />
+ <Error Condition="!Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.1.0.2.3\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.1.0.2.3\build\native\grpc.dependencies.openssl.props')" />
+ <Error Condition="!Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.1.0.2.3\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.1.0.2.3\build\native\grpc.dependencies.openssl.targets')" />
+ </Target>
+</Project>
+
diff --git a/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj.filters b/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj.filters
new file mode 100644
index 0000000..839493a
--- /dev/null
+++ b/vsprojects/vcxproj/test/stress_test/stress_test.vcxproj.filters
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\test\proto\empty.proto">
+ <Filter>test\proto</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\test\proto\messages.proto">
+ <Filter>test\proto</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\test\proto\test.proto">
+ <Filter>test\proto</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\test\cpp\interop\interop_client.cc">
+ <Filter>test\cpp\interop</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\test\cpp\interop\stress_interop_client.cc">
+ <Filter>test\cpp\interop</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\test\cpp\interop\stress_test.cc">
+ <Filter>test\cpp\interop</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\..\test\cpp\interop\client_helper.h">
+ <Filter>test\cpp\interop</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\test\cpp\interop\interop_client.h">
+ <Filter>test\cpp\interop</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\test\cpp\interop\stress_interop_client.h">
+ <Filter>test\cpp\interop</Filter>
+ </ClInclude>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Filter Include="test">
+ <UniqueIdentifier>{0fddcdfd-8fd7-bb4b-e21d-f53728f4a766}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\cpp">
+ <UniqueIdentifier>{a5c0e3f9-aa0c-45cd-87b0-b93b83e4ab9e}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\cpp\interop">
+ <UniqueIdentifier>{7afcf5a8-556a-6be3-15d4-b00b2518f8fb}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\proto">
+ <UniqueIdentifier>{7172a335-47bf-8284-380d-a28a05c07311}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
+