Merge branch 'master' of github.com:grpc/grpc into ip_parse_refactor

pull/6124/head
David Garcia Quintas 9 years ago
commit 2196c7e253
  1. 167
      Makefile
  2. 35
      build.yaml
  3. 885
      package.json
  4. 4
      src/core/ext/transport/chttp2/transport/chttp2_transport.c
  5. 2
      src/csharp/.nuget/packages.config
  6. 4
      src/csharp/Grpc.Core.Tests/ChannelTest.cs
  7. 10
      src/csharp/Grpc.Core.Tests/ClientServerTest.cs
  8. 2
      src/csharp/Grpc.Core.Tests/ContextPropagationTest.cs
  9. 30
      src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj
  10. 2
      src/csharp/Grpc.Core.Tests/HalfcloseTest.cs
  11. 2
      src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs
  12. 8
      src/csharp/Grpc.Core.Tests/MarshallingErrorsTest.cs
  13. 59
      src/csharp/Grpc.Core.Tests/NUnitMain.cs
  14. 2
      src/csharp/Grpc.Core.Tests/ResponseHeadersTest.cs
  15. 28
      src/csharp/Grpc.Core.Tests/SanityTest.cs
  16. 5
      src/csharp/Grpc.Core.Tests/packages.config
  17. 5
      src/csharp/Grpc.Core/Grpc.Core.csproj
  18. 8
      src/csharp/Grpc.Core/Grpc.Core.nuspec
  19. 0
      src/csharp/Grpc.Core/Grpc.Core.targets
  20. 27
      src/csharp/Grpc.Core/Internal/NativeExtension.cs
  21. 24
      src/csharp/Grpc.Core/Internal/UnmanagedLibrary.cs
  22. 97
      src/csharp/Grpc.Core/Logging/ConsoleLogger.cs
  23. 176
      src/csharp/Grpc.Core/Logging/TextWriterLogger.cs
  24. 18
      src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj
  25. 2
      src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs
  26. 59
      src/csharp/Grpc.Examples.Tests/NUnitMain.cs
  27. 11
      src/csharp/Grpc.Examples.Tests/packages.config
  28. 3
      src/csharp/Grpc.Examples/Grpc.Examples.csproj
  29. 2
      src/csharp/Grpc.Examples/packages.config
  30. 25
      src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.csproj
  31. 59
      src/csharp/Grpc.HealthCheck.Tests/NUnitMain.cs
  32. 3
      src/csharp/Grpc.HealthCheck.Tests/packages.config
  33. 6
      src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs
  34. 47
      src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj
  35. 113
      src/csharp/Grpc.IntegrationTesting/HeaderInterceptorTest.cs
  36. 8
      src/csharp/Grpc.IntegrationTesting/InteropClient.cs
  37. 59
      src/csharp/Grpc.IntegrationTesting/NUnitMain.cs
  38. 33
      src/csharp/Grpc.IntegrationTesting/TestCredentials.cs
  39. 204
      src/csharp/Grpc.IntegrationTesting/TestServiceGrpc.cs
  40. 3
      src/csharp/Grpc.IntegrationTesting/packages.config
  41. 13
      src/csharp/build_packages.bat
  42. 22
      src/csharp/grpc.native.csharp/README.md
  43. 22
      src/csharp/tests.json
  44. 22
      templates/package.json.template
  45. 13
      templates/src/csharp/build_packages.bat.template
  46. 8
      templates/tools/fuzzer/runners.template
  47. 2
      test/core/client_config/uri_corpus/02d156dc5e6f2c11c90c2e06fcee04adf036a342
  48. 2
      test/core/client_config/uri_corpus/1155aa6ea7ef262a81a63692513ea395f84dad6f
  49. 1
      test/core/client_config/uri_corpus/13856a5569ffd085a4d5c07af5f8e9310835a118
  50. 1
      test/core/client_config/uri_corpus/396568fc41c8ccb31ec925b4a862e4d29ead1327
  51. 1
      test/core/client_config/uri_corpus/3b1e7526a99918006b87e499d2beb6c4ac9c3c0c
  52. 1
      test/core/client_config/uri_corpus/41963cc10752f70c3af7e3d85868efb097a0ea9c
  53. 1
      test/core/client_config/uri_corpus/56a2da4b2e6fb795243901023ed8d0aa083d1aab
  54. 2
      test/core/client_config/uri_corpus/574c2f13858a9a6d724654bd913ede9ae3abf822
  55. 1
      test/core/client_config/uri_corpus/582f789c19033a152094cbf8565f14154a778ddb
  56. 1
      test/core/client_config/uri_corpus/6ae3acd9d8507b61bf235748026080a4138dba58
  57. 1
      test/core/client_config/uri_corpus/7ff4d8b8d1ffd0d42c48bbb91e5856a9ec31aecb
  58. 2
      test/core/client_config/uri_corpus/87daa131e0973b77a232a870ed749ef29cf58e6d
  59. 1
      test/core/client_config/uri_corpus/8d7e944fd5d0ede94097fcc98b47b09a3f9c76cb
  60. 1
      test/core/client_config/uri_corpus/9671149af0b444f59bbdf71340d3441dadd8a7b4
  61. 1
      test/core/client_config/uri_corpus/a1140f3f8b5cffc1010221b9a4084a25fb75c1f6
  62. 1
      test/core/client_config/uri_corpus/aba1472880406a318ce207ee79815b7acf087757
  63. 1
      test/core/client_config/uri_corpus/c28a47409cf5d95bb372238d01e73d8b831408e4
  64. 2
      test/core/client_config/uri_corpus/c3ef1d41888063a08700c3add1e4465aabcf8807
  65. 1
      test/core/client_config/uri_corpus/c550a76af21f9b9cc92a386d5c8998b26f8f2e4d
  66. 1
      test/core/client_config/uri_corpus/c79721406d0ab80495f186fd88e37fba98637ae9
  67. 1
      test/core/client_config/uri_corpus/e241f29957b0e30ec11aaaf91b2339f7015fa5fd
  68. 154
      test/core/end2end/fuzzers/client_fuzzer.c
  69. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/001946397b463a3562c5951f6325069d8a3a2ded
  70. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/01b05a9eaa95950f697627264bbd5006060f68e5
  71. 1
      test/core/end2end/fuzzers/client_fuzzer_corpus/01c9569f5835a576fc50ea03141662c7ef1aa088
  72. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/03abf728ac1d833c2d4a9ff7e0c912b949edc04c
  73. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/078232947d7ff25557e836b4e9e907214e99b320
  74. 1
      test/core/end2end/fuzzers/client_fuzzer_corpus/0949f4ac376808482be6ab2dcb18a2ecb08d9a52
  75. 1
      test/core/end2end/fuzzers/client_fuzzer_corpus/0c5e0660ddf5f14af8f3fbcc754a967506994c9b
  76. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/0d36da88698737ec1ca7b55b30fe2b2036de7e19
  77. 1
      test/core/end2end/fuzzers/client_fuzzer_corpus/0dd33527db106a3e84172e8f2189734b00ced4ed
  78. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/0e354d89d02c6c5cbba2f140dab7b609bf00793e
  79. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/1402bbcac6fa24eeb0475250e33f704096e2fb45
  80. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/1602788cf33d0354d6d48ead549e5137cd211979
  81. 2
      test/core/end2end/fuzzers/client_fuzzer_corpus/18185cbf9e9cfc1fd28d27ed0d651d7cee6a2c06
  82. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/18850965807039500c7f5450a907e86825cf823d
  83. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/18926cdc608599e8df6b0f4df99d4ad856ef4373
  84. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/19e984af62c36fe982284c87421d8ee46173e9f0
  85. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/1c222dae4e2cde1fca9f9bf6226200f70d625342
  86. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/1cbcaad71950c62d41bab50f9c242d014cc0d904
  87. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/1d19042e6db2a90c52fcc3cb0aa76f2fd335014e
  88. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/1fe7d16ffc2084d5d3c5f23d16902ae8810a5393
  89. 1
      test/core/end2end/fuzzers/client_fuzzer_corpus/20539e464ced1a0a63d74bae731ca0a75db05967
  90. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/207e12d6a84dc8fa020b3a60b3f75932ca4f8fa5
  91. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/20ea73876cc9cd5b3d3efa1bda21deb5eac2d61e
  92. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/21a6a133f3d1e06c077032ba56a7df4161f62efe
  93. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/230527b90b0179139c961aca426187893191fdf2
  94. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/25761748660a64111a8daa46f72ea1f336c2046a
  95. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/25949b623930511f9d43fea4aa56a4389a28e11a
  96. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/26b8a9d27cef1ce4c3c5aefa2dee50001aab4b13
  97. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/29952a15459cce9c647255ab5d7486df0507eff4
  98. 2
      test/core/end2end/fuzzers/client_fuzzer_corpus/2a8260b23460f90f770cedcafa14868d24db201e
  99. 2
      test/core/end2end/fuzzers/client_fuzzer_corpus/2b71439e9ebf611a92386b9f21ad44bde7926184
  100. BIN
      test/core/end2end/fuzzers/client_fuzzer_corpus/2c342f8715556398d49bcf3343b5a249d968e19e
  101. Some files were not shown because too many files have changed in this diff Show More

@ -888,6 +888,7 @@ chttp2_hpack_encoder_test: $(BINDIR)/$(CONFIG)/chttp2_hpack_encoder_test
chttp2_status_conversion_test: $(BINDIR)/$(CONFIG)/chttp2_status_conversion_test
chttp2_stream_map_test: $(BINDIR)/$(CONFIG)/chttp2_stream_map_test
chttp2_varint_test: $(BINDIR)/$(CONFIG)/chttp2_varint_test
client_fuzzer: $(BINDIR)/$(CONFIG)/client_fuzzer
compression_test: $(BINDIR)/$(CONFIG)/compression_test
concurrent_connectivity_test: $(BINDIR)/$(CONFIG)/concurrent_connectivity_test
dns_resolver_connectivity_test: $(BINDIR)/$(CONFIG)/dns_resolver_connectivity_test
@ -998,7 +999,8 @@ channel_arguments_test: $(BINDIR)/$(CONFIG)/channel_arguments_test
cli_call_test: $(BINDIR)/$(CONFIG)/cli_call_test
client_crash_test: $(BINDIR)/$(CONFIG)/client_crash_test
client_crash_test_server: $(BINDIR)/$(CONFIG)/client_crash_test_server
codegen_test: $(BINDIR)/$(CONFIG)/codegen_test
codegen_test_full: $(BINDIR)/$(CONFIG)/codegen_test_full
codegen_test_minimal: $(BINDIR)/$(CONFIG)/codegen_test_minimal
credentials_test: $(BINDIR)/$(CONFIG)/credentials_test
cxx_byte_buffer_test: $(BINDIR)/$(CONFIG)/cxx_byte_buffer_test
cxx_slice_test: $(BINDIR)/$(CONFIG)/cxx_slice_test
@ -1116,6 +1118,7 @@ h2_sockpair_nosec_test: $(BINDIR)/$(CONFIG)/h2_sockpair_nosec_test
h2_sockpair+trace_nosec_test: $(BINDIR)/$(CONFIG)/h2_sockpair+trace_nosec_test
h2_sockpair_1byte_nosec_test: $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_nosec_test
h2_uds_nosec_test: $(BINDIR)/$(CONFIG)/h2_uds_nosec_test
client_fuzzer_one_entry: $(BINDIR)/$(CONFIG)/client_fuzzer_one_entry
hpack_parser_fuzzer_test_one_entry: $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test_one_entry
http_fuzzer_test_one_entry: $(BINDIR)/$(CONFIG)/http_fuzzer_test_one_entry
json_fuzzer_test_one_entry: $(BINDIR)/$(CONFIG)/json_fuzzer_test_one_entry
@ -1342,6 +1345,7 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/h2_sockpair+trace_nosec_test \
$(BINDIR)/$(CONFIG)/h2_sockpair_1byte_nosec_test \
$(BINDIR)/$(CONFIG)/h2_uds_nosec_test \
$(BINDIR)/$(CONFIG)/client_fuzzer_one_entry \
$(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test_one_entry \
$(BINDIR)/$(CONFIG)/http_fuzzer_test_one_entry \
$(BINDIR)/$(CONFIG)/json_fuzzer_test_one_entry \
@ -1361,7 +1365,8 @@ buildtests_cxx: buildtests_zookeeper privatelibs_cxx \
$(BINDIR)/$(CONFIG)/cli_call_test \
$(BINDIR)/$(CONFIG)/client_crash_test \
$(BINDIR)/$(CONFIG)/client_crash_test_server \
$(BINDIR)/$(CONFIG)/codegen_test \
$(BINDIR)/$(CONFIG)/codegen_test_full \
$(BINDIR)/$(CONFIG)/codegen_test_minimal \
$(BINDIR)/$(CONFIG)/credentials_test \
$(BINDIR)/$(CONFIG)/cxx_byte_buffer_test \
$(BINDIR)/$(CONFIG)/cxx_slice_test \
@ -1680,8 +1685,10 @@ test_cxx: test_zookeeper buildtests_cxx
$(Q) $(BINDIR)/$(CONFIG)/cli_call_test || ( echo test cli_call_test failed ; exit 1 )
$(E) "[RUN] Testing client_crash_test"
$(Q) $(BINDIR)/$(CONFIG)/client_crash_test || ( echo test client_crash_test failed ; exit 1 )
$(E) "[RUN] Testing codegen_test"
$(Q) $(BINDIR)/$(CONFIG)/codegen_test || ( echo test codegen_test failed ; exit 1 )
$(E) "[RUN] Testing codegen_test_full"
$(Q) $(BINDIR)/$(CONFIG)/codegen_test_full || ( echo test codegen_test_full failed ; exit 1 )
$(E) "[RUN] Testing codegen_test_minimal"
$(Q) $(BINDIR)/$(CONFIG)/codegen_test_minimal || ( echo test codegen_test_minimal failed ; exit 1 )
$(E) "[RUN] Testing credentials_test"
$(Q) $(BINDIR)/$(CONFIG)/credentials_test || ( echo test credentials_test failed ; exit 1 )
$(E) "[RUN] Testing cxx_byte_buffer_test"
@ -6244,6 +6251,38 @@ endif
endif
CLIENT_FUZZER_SRC = \
test/core/end2end/fuzzers/client_fuzzer.c \
CLIENT_FUZZER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CLIENT_FUZZER_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/client_fuzzer: openssl_dep_error
else
$(BINDIR)/$(CONFIG)/client_fuzzer: $(CLIENT_FUZZER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LDXX) $(LDFLAGS) $(CLIENT_FUZZER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -lFuzzer -o $(BINDIR)/$(CONFIG)/client_fuzzer
endif
$(OBJDIR)/$(CONFIG)/test/core/end2end/fuzzers/client_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_client_fuzzer: $(CLIENT_FUZZER_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(CLIENT_FUZZER_OBJS:.o=.dep)
endif
endif
COMPRESSION_TEST_SRC = \
test/core/compression/compression_test.c \
@ -9863,22 +9902,88 @@ endif
endif
CODEGEN_TEST_SRC = \
CODEGEN_TEST_FULL_SRC = \
$(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc \
test/cpp/codegen/codegen_test_full.cc \
src/cpp/codegen/codegen_init.cc \
CODEGEN_TEST_FULL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CODEGEN_TEST_FULL_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/codegen_test_full: 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)/codegen_test_full: protobuf_dep_error
else
$(BINDIR)/$(CONFIG)/codegen_test_full: $(PROTOBUF_DEP) $(CODEGEN_TEST_FULL_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LDXX) $(LDFLAGS) $(CODEGEN_TEST_FULL_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/codegen_test_full
endif
endif
$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/control.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/messages.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/payloads.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/perf_db.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/services.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/stats.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test_full.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(OBJDIR)/$(CONFIG)/src/cpp/codegen/codegen_init.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_codegen_test_full: $(CODEGEN_TEST_FULL_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(CODEGEN_TEST_FULL_OBJS:.o=.dep)
endif
endif
$(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test_full.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc
$(OBJDIR)/$(CONFIG)/src/cpp/codegen/codegen_init.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc
CODEGEN_TEST_MINIMAL_SRC = \
$(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc \
test/cpp/codegen/codegen_test.cc \
test/cpp/codegen/codegen_test_minimal.cc \
src/cpp/codegen/codegen_init.cc \
CODEGEN_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CODEGEN_TEST_SRC))))
CODEGEN_TEST_MINIMAL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CODEGEN_TEST_MINIMAL_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/codegen_test: openssl_dep_error
$(BINDIR)/$(CONFIG)/codegen_test_minimal: openssl_dep_error
else
@ -9889,14 +9994,14 @@ 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)/codegen_test: protobuf_dep_error
$(BINDIR)/$(CONFIG)/codegen_test_minimal: protobuf_dep_error
else
$(BINDIR)/$(CONFIG)/codegen_test: $(PROTOBUF_DEP) $(CODEGEN_TEST_OBJS)
$(BINDIR)/$(CONFIG)/codegen_test_minimal: $(PROTOBUF_DEP) $(CODEGEN_TEST_MINIMAL_OBJS)
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LDXX) $(LDFLAGS) $(CODEGEN_TEST_OBJS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/codegen_test
$(Q) $(LDXX) $(LDFLAGS) $(CODEGEN_TEST_MINIMAL_OBJS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/codegen_test_minimal
endif
@ -9914,18 +10019,18 @@ $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/services.o:
$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/stats.o:
$(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test.o:
$(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test_minimal.o:
$(OBJDIR)/$(CONFIG)/src/cpp/codegen/codegen_init.o:
deps_codegen_test: $(CODEGEN_TEST_OBJS:.o=.dep)
deps_codegen_test_minimal: $(CODEGEN_TEST_MINIMAL_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(CODEGEN_TEST_OBJS:.o=.dep)
-include $(CODEGEN_TEST_MINIMAL_OBJS:.o=.dep)
endif
endif
$(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc
$(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test_minimal.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc
$(OBJDIR)/$(CONFIG)/src/cpp/codegen/codegen_init.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc
@ -13699,6 +13804,38 @@ ifneq ($(NO_DEPS),true)
endif
CLIENT_FUZZER_ONE_ENTRY_SRC = \
test/core/end2end/fuzzers/client_fuzzer.c \
CLIENT_FUZZER_ONE_ENTRY_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CLIENT_FUZZER_ONE_ENTRY_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/client_fuzzer_one_entry: openssl_dep_error
else
$(BINDIR)/$(CONFIG)/client_fuzzer_one_entry: $(CLIENT_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libone_input_fuzzer.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LD) $(LDFLAGS) $(CLIENT_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libone_input_fuzzer.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/client_fuzzer_one_entry
endif
$(OBJDIR)/$(CONFIG)/test/core/end2end/fuzzers/client_fuzzer.o: $(LIBDIR)/$(CONFIG)/libone_input_fuzzer.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_client_fuzzer_one_entry: $(CLIENT_FUZZER_ONE_ENTRY_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(CLIENT_FUZZER_ONE_ENTRY_OBJS:.o=.dep)
endif
endif
HPACK_PARSER_FUZZER_TEST_ONE_ENTRY_SRC = \
test/core/transport/chttp2/hpack_parser_fuzzer_test.c \

@ -1173,6 +1173,19 @@ targets:
- grpc
- gpr_test_util
- gpr
- name: client_fuzzer
build: fuzzer
language: c
src:
- test/core/end2end/fuzzers/client_fuzzer.c
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
corpus_dirs:
- test/core/end2end/fuzzers/client_fuzzer_corpus
maxlen: 2048
- name: compression_test
build: test
language: c
@ -2375,7 +2388,25 @@ targets:
- grpc
- gpr_test_util
- gpr
- name: codegen_test
- name: codegen_test_full
gtest: true
build: test
language: c++
src:
- src/proto/grpc/testing/control.proto
- src/proto/grpc/testing/messages.proto
- src/proto/grpc/testing/payloads.proto
- src/proto/grpc/testing/perf_db.proto
- src/proto/grpc/testing/services.proto
- src/proto/grpc/testing/stats.proto
- test/cpp/codegen/codegen_test_full.cc
deps:
- grpc++
- grpc
- gpr
filegroups:
- grpc++_codegen
- name: codegen_test_minimal
gtest: true
build: test
language: c++
@ -2386,7 +2417,7 @@ targets:
- src/proto/grpc/testing/perf_db.proto
- src/proto/grpc/testing/services.proto
- src/proto/grpc/testing/stats.proto
- test/cpp/codegen/codegen_test.cc
- test/cpp/codegen/codegen_test_minimal.cc
filegroups:
- grpc++_codegen
- name: credentials_test

@ -61,885 +61,14 @@
"src/node/health_check",
"src/proto",
"etc",
"src/node/ext/byte_buffer.h",
"src/node/ext/call.h",
"src/node/ext/call_credentials.h",
"src/node/ext/channel.h",
"src/node/ext/channel_credentials.h",
"src/node/ext/completion_queue_async_worker.h",
"src/node/ext/server.h",
"src/node/ext/server_credentials.h",
"src/node/ext/timeval.h",
"src/node/ext/byte_buffer.cc",
"src/node/ext/call.cc",
"src/node/ext/call_credentials.cc",
"src/node/ext/channel.cc",
"src/node/ext/channel_credentials.cc",
"src/node/ext/completion_queue_async_worker.cc",
"src/node/ext/node_grpc.cc",
"src/node/ext/server.cc",
"src/node/ext/server_credentials.cc",
"src/node/ext/timeval.cc",
"src/node/index.js",
"src/node/src/client.js",
"src/node/src/common.js",
"src/node/src/credentials.js",
"src/node/src/grpc_extension.js",
"src/node/src/metadata.js",
"src/node/src/server.js",
"include/grpc/byte_buffer.h",
"include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h",
"include/grpc/grpc.h",
"include/grpc/status.h",
"include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h",
"include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_win32.h",
"include/grpc/impl/codegen/log.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
"include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_win32.h",
"include/grpc/impl/codegen/time.h",
"include/grpc/grpc_security.h",
"include/grpc/census.h",
"src/core/lib/channel/channel_args.h",
"src/core/lib/channel/channel_stack.h",
"src/core/lib/channel/channel_stack_builder.h",
"src/core/lib/channel/compress_filter.h",
"src/core/lib/channel/connected_channel.h",
"src/core/lib/channel/context.h",
"src/core/lib/channel/http_client_filter.h",
"src/core/lib/channel/http_server_filter.h",
"src/core/lib/compression/algorithm_metadata.h",
"src/core/lib/compression/message_compress.h",
"src/core/lib/debug/trace.h",
"src/core/lib/http/format_request.h",
"src/core/lib/http/httpcli.h",
"src/core/lib/http/parser.h",
"src/core/lib/iomgr/closure.h",
"src/core/lib/iomgr/endpoint.h",
"src/core/lib/iomgr/endpoint_pair.h",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.h",
"src/core/lib/iomgr/ev_posix.h",
"src/core/lib/iomgr/exec_ctx.h",
"src/core/lib/iomgr/executor.h",
"src/core/lib/iomgr/iocp_windows.h",
"src/core/lib/iomgr/iomgr.h",
"src/core/lib/iomgr/iomgr_internal.h",
"src/core/lib/iomgr/iomgr_posix.h",
"src/core/lib/iomgr/pollset.h",
"src/core/lib/iomgr/pollset_set.h",
"src/core/lib/iomgr/pollset_set_windows.h",
"src/core/lib/iomgr/pollset_windows.h",
"src/core/lib/iomgr/resolve_address.h",
"src/core/lib/iomgr/sockaddr.h",
"src/core/lib/iomgr/sockaddr_posix.h",
"src/core/lib/iomgr/sockaddr_utils.h",
"src/core/lib/iomgr/sockaddr_win32.h",
"src/core/lib/iomgr/socket_utils_posix.h",
"src/core/lib/iomgr/socket_windows.h",
"src/core/lib/iomgr/tcp_client.h",
"src/core/lib/iomgr/tcp_posix.h",
"src/core/lib/iomgr/tcp_server.h",
"src/core/lib/iomgr/tcp_windows.h",
"src/core/lib/iomgr/time_averaged_stats.h",
"src/core/lib/iomgr/timer.h",
"src/core/lib/iomgr/timer_heap.h",
"src/core/lib/iomgr/udp_server.h",
"src/core/lib/iomgr/unix_sockets_posix.h",
"src/core/lib/iomgr/wakeup_fd_pipe.h",
"src/core/lib/iomgr/wakeup_fd_posix.h",
"src/core/lib/iomgr/workqueue.h",
"src/core/lib/iomgr/workqueue_posix.h",
"src/core/lib/iomgr/workqueue_windows.h",
"src/core/lib/json/json.h",
"src/core/lib/json/json_common.h",
"src/core/lib/json/json_reader.h",
"src/core/lib/json/json_writer.h",
"src/core/lib/surface/api_trace.h",
"src/core/lib/surface/call.h",
"src/core/lib/surface/call_test_only.h",
"src/core/lib/surface/channel.h",
"src/core/lib/surface/channel_init.h",
"src/core/lib/surface/channel_stack_type.h",
"src/core/lib/surface/completion_queue.h",
"src/core/lib/surface/event_string.h",
"src/core/lib/surface/init.h",
"src/core/lib/surface/lame_client.h",
"src/core/lib/surface/server.h",
"src/core/lib/surface/surface_trace.h",
"src/core/lib/transport/byte_stream.h",
"src/core/lib/transport/connectivity_state.h",
"src/core/lib/transport/metadata.h",
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/static_metadata.h",
"src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h",
"src/core/ext/transport/chttp2/transport/bin_encoder.h",
"src/core/ext/transport/chttp2/transport/chttp2_transport.h",
"src/core/ext/transport/chttp2/transport/frame.h",
"src/core/ext/transport/chttp2/transport/frame_data.h",
"src/core/ext/transport/chttp2/transport/frame_goaway.h",
"src/core/ext/transport/chttp2/transport/frame_ping.h",
"src/core/ext/transport/chttp2/transport/frame_rst_stream.h",
"src/core/ext/transport/chttp2/transport/frame_settings.h",
"src/core/ext/transport/chttp2/transport/frame_window_update.h",
"src/core/ext/transport/chttp2/transport/hpack_encoder.h",
"src/core/ext/transport/chttp2/transport/hpack_parser.h",
"src/core/ext/transport/chttp2/transport/hpack_table.h",
"src/core/ext/transport/chttp2/transport/http2_errors.h",
"src/core/ext/transport/chttp2/transport/huffsyms.h",
"src/core/ext/transport/chttp2/transport/incoming_metadata.h",
"src/core/ext/transport/chttp2/transport/internal.h",
"src/core/ext/transport/chttp2/transport/status_conversion.h",
"src/core/ext/transport/chttp2/transport/stream_map.h",
"src/core/ext/transport/chttp2/transport/timeout_encoding.h",
"src/core/ext/transport/chttp2/transport/varint.h",
"src/core/ext/transport/chttp2/alpn/alpn.h",
"src/core/lib/security/auth_filters.h",
"src/core/lib/security/b64.h",
"src/core/lib/security/credentials.h",
"src/core/lib/security/handshake.h",
"src/core/lib/security/json_token.h",
"src/core/lib/security/jwt_verifier.h",
"src/core/lib/security/secure_endpoint.h",
"src/core/lib/security/security_connector.h",
"src/core/lib/security/security_context.h",
"src/core/lib/tsi/fake_transport_security.h",
"src/core/lib/tsi/ssl_transport_security.h",
"src/core/lib/tsi/ssl_types.h",
"src/core/lib/tsi/transport_security.h",
"src/core/lib/tsi/transport_security_interface.h",
"src/core/ext/client_config/client_channel.h",
"src/core/ext/client_config/client_channel_factory.h",
"src/core/ext/client_config/client_config.h",
"src/core/ext/client_config/connector.h",
"src/core/ext/client_config/initial_connect_string.h",
"src/core/ext/client_config/lb_policy.h",
"src/core/ext/client_config/lb_policy_factory.h",
"src/core/ext/client_config/lb_policy_registry.h",
"src/core/ext/client_config/parse_address.h",
"src/core/ext/client_config/resolver.h",
"src/core/ext/client_config/resolver_factory.h",
"src/core/ext/client_config/resolver_registry.h",
"src/core/ext/client_config/subchannel.h",
"src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.h",
"src/core/ext/lb_policy/grpclb/load_balancer_api.h",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h",
"third_party/nanopb/pb.h",
"third_party/nanopb/pb_common.h",
"third_party/nanopb/pb_decode.h",
"third_party/nanopb/pb_encode.h",
"src/core/ext/census/aggregation.h",
"src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/grpc_filter.h",
"src/core/ext/census/mlog.h",
"src/core/ext/census/rpc_metric_id.h",
"src/core/lib/channel/channel_args.c",
"src/core/lib/channel/channel_stack.c",
"src/core/lib/channel/channel_stack_builder.c",
"src/core/lib/channel/compress_filter.c",
"src/core/lib/channel/connected_channel.c",
"src/core/lib/channel/http_client_filter.c",
"src/core/lib/channel/http_server_filter.c",
"src/core/lib/compression/compression_algorithm.c",
"src/core/lib/compression/message_compress.c",
"src/core/lib/debug/trace.c",
"src/core/lib/http/format_request.c",
"src/core/lib/http/httpcli.c",
"src/core/lib/http/parser.c",
"src/core/lib/iomgr/closure.c",
"src/core/lib/iomgr/endpoint.c",
"src/core/lib/iomgr/endpoint_pair_posix.c",
"src/core/lib/iomgr/endpoint_pair_windows.c",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.c",
"src/core/lib/iomgr/ev_posix.c",
"src/core/lib/iomgr/exec_ctx.c",
"src/core/lib/iomgr/executor.c",
"src/core/lib/iomgr/iocp_windows.c",
"src/core/lib/iomgr/iomgr.c",
"src/core/lib/iomgr/iomgr_posix.c",
"src/core/lib/iomgr/iomgr_windows.c",
"src/core/lib/iomgr/pollset_set_windows.c",
"src/core/lib/iomgr/pollset_windows.c",
"src/core/lib/iomgr/resolve_address_posix.c",
"src/core/lib/iomgr/resolve_address_windows.c",
"src/core/lib/iomgr/sockaddr_utils.c",
"src/core/lib/iomgr/socket_utils_common_posix.c",
"src/core/lib/iomgr/socket_utils_linux.c",
"src/core/lib/iomgr/socket_utils_posix.c",
"src/core/lib/iomgr/socket_windows.c",
"src/core/lib/iomgr/tcp_client_posix.c",
"src/core/lib/iomgr/tcp_client_windows.c",
"src/core/lib/iomgr/tcp_posix.c",
"src/core/lib/iomgr/tcp_server_posix.c",
"src/core/lib/iomgr/tcp_server_windows.c",
"src/core/lib/iomgr/tcp_windows.c",
"src/core/lib/iomgr/time_averaged_stats.c",
"src/core/lib/iomgr/timer.c",
"src/core/lib/iomgr/timer_heap.c",
"src/core/lib/iomgr/udp_server.c",
"src/core/lib/iomgr/unix_sockets_posix.c",
"src/core/lib/iomgr/unix_sockets_posix_noop.c",
"src/core/lib/iomgr/wakeup_fd_eventfd.c",
"src/core/lib/iomgr/wakeup_fd_nospecial.c",
"src/core/lib/iomgr/wakeup_fd_pipe.c",
"src/core/lib/iomgr/wakeup_fd_posix.c",
"src/core/lib/iomgr/workqueue_posix.c",
"src/core/lib/iomgr/workqueue_windows.c",
"src/core/lib/json/json.c",
"src/core/lib/json/json_reader.c",
"src/core/lib/json/json_string.c",
"src/core/lib/json/json_writer.c",
"src/core/lib/surface/alarm.c",
"src/core/lib/surface/api_trace.c",
"src/core/lib/surface/byte_buffer.c",
"src/core/lib/surface/byte_buffer_reader.c",
"src/core/lib/surface/call.c",
"src/core/lib/surface/call_details.c",
"src/core/lib/surface/call_log_batch.c",
"src/core/lib/surface/channel.c",
"src/core/lib/surface/channel_init.c",
"src/core/lib/surface/channel_ping.c",
"src/core/lib/surface/channel_stack_type.c",
"src/core/lib/surface/completion_queue.c",
"src/core/lib/surface/event_string.c",
"src/core/lib/surface/init.c",
"src/core/lib/surface/lame_client.c",
"src/core/lib/surface/metadata_array.c",
"src/core/lib/surface/server.c",
"src/core/lib/surface/validate_metadata.c",
"src/core/lib/surface/version.c",
"src/core/lib/transport/byte_stream.c",
"src/core/lib/transport/connectivity_state.c",
"src/core/lib/transport/metadata.c",
"src/core/lib/transport/metadata_batch.c",
"src/core/lib/transport/static_metadata.c",
"src/core/lib/transport/transport.c",
"src/core/lib/transport/transport_op_string.c",
"src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c",
"src/core/ext/transport/chttp2/transport/bin_encoder.c",
"src/core/ext/transport/chttp2/transport/chttp2_plugin.c",
"src/core/ext/transport/chttp2/transport/chttp2_transport.c",
"src/core/ext/transport/chttp2/transport/frame_data.c",
"src/core/ext/transport/chttp2/transport/frame_goaway.c",
"src/core/ext/transport/chttp2/transport/frame_ping.c",
"src/core/ext/transport/chttp2/transport/frame_rst_stream.c",
"src/core/ext/transport/chttp2/transport/frame_settings.c",
"src/core/ext/transport/chttp2/transport/frame_window_update.c",
"src/core/ext/transport/chttp2/transport/hpack_encoder.c",
"src/core/ext/transport/chttp2/transport/hpack_parser.c",
"src/core/ext/transport/chttp2/transport/hpack_table.c",
"src/core/ext/transport/chttp2/transport/huffsyms.c",
"src/core/ext/transport/chttp2/transport/incoming_metadata.c",
"src/core/ext/transport/chttp2/transport/parsing.c",
"src/core/ext/transport/chttp2/transport/status_conversion.c",
"src/core/ext/transport/chttp2/transport/stream_lists.c",
"src/core/ext/transport/chttp2/transport/stream_map.c",
"src/core/ext/transport/chttp2/transport/timeout_encoding.c",
"src/core/ext/transport/chttp2/transport/varint.c",
"src/core/ext/transport/chttp2/transport/writing.c",
"src/core/ext/transport/chttp2/alpn/alpn.c",
"src/core/lib/http/httpcli_security_connector.c",
"src/core/lib/security/b64.c",
"src/core/lib/security/client_auth_filter.c",
"src/core/lib/security/credentials.c",
"src/core/lib/security/credentials_metadata.c",
"src/core/lib/security/credentials_posix.c",
"src/core/lib/security/credentials_win32.c",
"src/core/lib/security/google_default_credentials.c",
"src/core/lib/security/handshake.c",
"src/core/lib/security/json_token.c",
"src/core/lib/security/jwt_verifier.c",
"src/core/lib/security/secure_endpoint.c",
"src/core/lib/security/security_connector.c",
"src/core/lib/security/security_context.c",
"src/core/lib/security/server_auth_filter.c",
"src/core/lib/surface/init_secure.c",
"src/core/lib/tsi/fake_transport_security.c",
"src/core/lib/tsi/ssl_transport_security.c",
"src/core/lib/tsi/transport_security.c",
"src/core/ext/transport/chttp2/client/secure/secure_channel_create.c",
"src/core/ext/client_config/channel_connectivity.c",
"src/core/ext/client_config/client_channel.c",
"src/core/ext/client_config/client_channel_factory.c",
"src/core/ext/client_config/client_config.c",
"src/core/ext/client_config/client_config_plugin.c",
"src/core/ext/client_config/connector.c",
"src/core/ext/client_config/default_initial_connect_string.c",
"src/core/ext/client_config/initial_connect_string.c",
"src/core/ext/client_config/lb_policy.c",
"src/core/ext/client_config/lb_policy_factory.c",
"src/core/ext/client_config/lb_policy_registry.c",
"src/core/ext/client_config/parse_address.c",
"src/core/ext/client_config/resolver.c",
"src/core/ext/client_config/resolver_factory.c",
"src/core/ext/client_config/resolver_registry.c",
"src/core/ext/client_config/subchannel.c",
"src/core/ext/client_config/subchannel_call_holder.c",
"src/core/ext/client_config/subchannel_index.c",
"src/core/ext/client_config/uri_parser.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
"src/core/ext/transport/chttp2/client/insecure/channel_create.c",
"src/core/ext/lb_policy/grpclb/load_balancer_api.c",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c",
"third_party/nanopb/pb_common.c",
"third_party/nanopb/pb_decode.c",
"third_party/nanopb/pb_encode.c",
"src/core/ext/lb_policy/pick_first/pick_first.c",
"src/core/ext/lb_policy/round_robin/round_robin.c",
"src/core/ext/resolver/dns/native/dns_resolver.c",
"src/core/ext/resolver/sockaddr/sockaddr_resolver.c",
"src/core/ext/census/context.c",
"src/core/ext/census/grpc_context.c",
"src/core/ext/census/grpc_filter.c",
"src/core/ext/census/grpc_plugin.c",
"src/core/ext/census/initialize.c",
"src/core/ext/census/mlog.c",
"src/core/ext/census/operation.c",
"src/core/ext/census/placeholders.c",
"src/core/ext/census/tracing.c",
"src/core/plugin_registry/grpc_plugin_registry.c",
"third_party/zlib/crc32.h",
"third_party/zlib/deflate.h",
"third_party/zlib/gzguts.h",
"third_party/zlib/inffast.h",
"third_party/zlib/inffixed.h",
"third_party/zlib/inflate.h",
"third_party/zlib/inftrees.h",
"third_party/zlib/trees.h",
"third_party/zlib/zconf.h",
"third_party/zlib/zlib.h",
"third_party/zlib/zutil.h",
"third_party/zlib/adler32.c",
"third_party/zlib/compress.c",
"third_party/zlib/crc32.c",
"third_party/zlib/deflate.c",
"third_party/zlib/gzclose.c",
"third_party/zlib/gzlib.c",
"third_party/zlib/gzread.c",
"third_party/zlib/gzwrite.c",
"third_party/zlib/infback.c",
"third_party/zlib/inffast.c",
"third_party/zlib/inflate.c",
"third_party/zlib/inftrees.c",
"third_party/zlib/trees.c",
"third_party/zlib/uncompr.c",
"third_party/zlib/zutil.c",
"third_party/boringssl/crypto/aes/internal.h",
"third_party/boringssl/crypto/asn1/asn1_locl.h",
"third_party/boringssl/crypto/bio/internal.h",
"third_party/boringssl/crypto/bn/internal.h",
"third_party/boringssl/crypto/bn/rsaz_exp.h",
"third_party/boringssl/crypto/bytestring/internal.h",
"third_party/boringssl/crypto/cipher/internal.h",
"third_party/boringssl/crypto/conf/conf_def.h",
"third_party/boringssl/crypto/conf/internal.h",
"third_party/boringssl/crypto/des/internal.h",
"third_party/boringssl/crypto/dh/internal.h",
"third_party/boringssl/crypto/digest/internal.h",
"third_party/boringssl/crypto/digest/md32_common.h",
"third_party/boringssl/crypto/directory.h",
"third_party/boringssl/crypto/dsa/internal.h",
"third_party/boringssl/crypto/ec/internal.h",
"third_party/boringssl/crypto/ec/p256-x86_64-table.h",
"third_party/boringssl/crypto/evp/internal.h",
"third_party/boringssl/crypto/internal.h",
"third_party/boringssl/crypto/modes/internal.h",
"third_party/boringssl/crypto/obj/obj_dat.h",
"third_party/boringssl/crypto/obj/obj_xref.h",
"third_party/boringssl/crypto/pkcs8/internal.h",
"third_party/boringssl/crypto/rand/internal.h",
"third_party/boringssl/crypto/rsa/internal.h",
"third_party/boringssl/crypto/test/scoped_types.h",
"third_party/boringssl/crypto/test/test_util.h",
"third_party/boringssl/crypto/x509/charmap.h",
"third_party/boringssl/crypto/x509/vpm_int.h",
"third_party/boringssl/crypto/x509v3/ext_dat.h",
"third_party/boringssl/crypto/x509v3/pcy_int.h",
"third_party/boringssl/include/openssl/aead.h",
"third_party/boringssl/include/openssl/aes.h",
"third_party/boringssl/include/openssl/arm_arch.h",
"third_party/boringssl/include/openssl/asn1.h",
"third_party/boringssl/include/openssl/asn1_mac.h",
"third_party/boringssl/include/openssl/asn1t.h",
"third_party/boringssl/include/openssl/base.h",
"third_party/boringssl/include/openssl/base64.h",
"third_party/boringssl/include/openssl/bio.h",
"third_party/boringssl/include/openssl/blowfish.h",
"third_party/boringssl/include/openssl/bn.h",
"third_party/boringssl/include/openssl/buf.h",
"third_party/boringssl/include/openssl/buffer.h",
"third_party/boringssl/include/openssl/bytestring.h",
"third_party/boringssl/include/openssl/cast.h",
"third_party/boringssl/include/openssl/chacha.h",
"third_party/boringssl/include/openssl/cipher.h",
"third_party/boringssl/include/openssl/cmac.h",
"third_party/boringssl/include/openssl/conf.h",
"third_party/boringssl/include/openssl/cpu.h",
"third_party/boringssl/include/openssl/crypto.h",
"third_party/boringssl/include/openssl/curve25519.h",
"third_party/boringssl/include/openssl/des.h",
"third_party/boringssl/include/openssl/dh.h",
"third_party/boringssl/include/openssl/digest.h",
"third_party/boringssl/include/openssl/dsa.h",
"third_party/boringssl/include/openssl/dtls1.h",
"third_party/boringssl/include/openssl/ec.h",
"third_party/boringssl/include/openssl/ec_key.h",
"third_party/boringssl/include/openssl/ecdh.h",
"third_party/boringssl/include/openssl/ecdsa.h",
"third_party/boringssl/include/openssl/engine.h",
"third_party/boringssl/include/openssl/err.h",
"third_party/boringssl/include/openssl/evp.h",
"third_party/boringssl/include/openssl/ex_data.h",
"third_party/boringssl/include/openssl/hkdf.h",
"third_party/boringssl/include/openssl/hmac.h",
"third_party/boringssl/include/openssl/lhash.h",
"third_party/boringssl/include/openssl/lhash_macros.h",
"third_party/boringssl/include/openssl/md4.h",
"third_party/boringssl/include/openssl/md5.h",
"third_party/boringssl/include/openssl/mem.h",
"third_party/boringssl/include/openssl/obj.h",
"third_party/boringssl/include/openssl/obj_mac.h",
"third_party/boringssl/include/openssl/objects.h",
"third_party/boringssl/include/openssl/opensslfeatures.h",
"third_party/boringssl/include/openssl/opensslv.h",
"third_party/boringssl/include/openssl/ossl_typ.h",
"third_party/boringssl/include/openssl/pem.h",
"third_party/boringssl/include/openssl/pkcs12.h",
"third_party/boringssl/include/openssl/pkcs7.h",
"third_party/boringssl/include/openssl/pkcs8.h",
"third_party/boringssl/include/openssl/poly1305.h",
"third_party/boringssl/include/openssl/pqueue.h",
"third_party/boringssl/include/openssl/rand.h",
"third_party/boringssl/include/openssl/rc4.h",
"third_party/boringssl/include/openssl/rsa.h",
"third_party/boringssl/include/openssl/safestack.h",
"third_party/boringssl/include/openssl/sha.h",
"third_party/boringssl/include/openssl/srtp.h",
"third_party/boringssl/include/openssl/ssl.h",
"third_party/boringssl/include/openssl/ssl3.h",
"third_party/boringssl/include/openssl/stack.h",
"third_party/boringssl/include/openssl/stack_macros.h",
"third_party/boringssl/include/openssl/thread.h",
"third_party/boringssl/include/openssl/time_support.h",
"third_party/boringssl/include/openssl/tls1.h",
"third_party/boringssl/include/openssl/type_check.h",
"third_party/boringssl/include/openssl/x509.h",
"third_party/boringssl/include/openssl/x509_vfy.h",
"third_party/boringssl/include/openssl/x509v3.h",
"third_party/boringssl/ssl/internal.h",
"third_party/boringssl/ssl/test/async_bio.h",
"third_party/boringssl/ssl/test/packeted_bio.h",
"third_party/boringssl/ssl/test/scoped_types.h",
"third_party/boringssl/ssl/test/test_config.h",
"src/boringssl/err_data.c",
"third_party/boringssl/crypto/aes/aes.c",
"third_party/boringssl/crypto/aes/mode_wrappers.c",
"third_party/boringssl/crypto/asn1/a_bitstr.c",
"third_party/boringssl/crypto/asn1/a_bool.c",
"third_party/boringssl/crypto/asn1/a_bytes.c",
"third_party/boringssl/crypto/asn1/a_d2i_fp.c",
"third_party/boringssl/crypto/asn1/a_dup.c",
"third_party/boringssl/crypto/asn1/a_enum.c",
"third_party/boringssl/crypto/asn1/a_gentm.c",
"third_party/boringssl/crypto/asn1/a_i2d_fp.c",
"third_party/boringssl/crypto/asn1/a_int.c",
"third_party/boringssl/crypto/asn1/a_mbstr.c",
"third_party/boringssl/crypto/asn1/a_object.c",
"third_party/boringssl/crypto/asn1/a_octet.c",
"third_party/boringssl/crypto/asn1/a_print.c",
"third_party/boringssl/crypto/asn1/a_strnid.c",
"third_party/boringssl/crypto/asn1/a_time.c",
"third_party/boringssl/crypto/asn1/a_type.c",
"third_party/boringssl/crypto/asn1/a_utctm.c",
"third_party/boringssl/crypto/asn1/a_utf8.c",
"third_party/boringssl/crypto/asn1/asn1_lib.c",
"third_party/boringssl/crypto/asn1/asn1_par.c",
"third_party/boringssl/crypto/asn1/asn_pack.c",
"third_party/boringssl/crypto/asn1/bio_asn1.c",
"third_party/boringssl/crypto/asn1/bio_ndef.c",
"third_party/boringssl/crypto/asn1/f_enum.c",
"third_party/boringssl/crypto/asn1/f_int.c",
"third_party/boringssl/crypto/asn1/f_string.c",
"third_party/boringssl/crypto/asn1/t_bitst.c",
"third_party/boringssl/crypto/asn1/t_pkey.c",
"third_party/boringssl/crypto/asn1/tasn_dec.c",
"third_party/boringssl/crypto/asn1/tasn_enc.c",
"third_party/boringssl/crypto/asn1/tasn_fre.c",
"third_party/boringssl/crypto/asn1/tasn_new.c",
"third_party/boringssl/crypto/asn1/tasn_prn.c",
"third_party/boringssl/crypto/asn1/tasn_typ.c",
"third_party/boringssl/crypto/asn1/tasn_utl.c",
"third_party/boringssl/crypto/asn1/x_bignum.c",
"third_party/boringssl/crypto/asn1/x_long.c",
"third_party/boringssl/crypto/base64/base64.c",
"third_party/boringssl/crypto/bio/bio.c",
"third_party/boringssl/crypto/bio/bio_mem.c",
"third_party/boringssl/crypto/bio/buffer.c",
"third_party/boringssl/crypto/bio/connect.c",
"third_party/boringssl/crypto/bio/fd.c",
"third_party/boringssl/crypto/bio/file.c",
"third_party/boringssl/crypto/bio/hexdump.c",
"third_party/boringssl/crypto/bio/pair.c",
"third_party/boringssl/crypto/bio/printf.c",
"third_party/boringssl/crypto/bio/socket.c",
"third_party/boringssl/crypto/bio/socket_helper.c",
"third_party/boringssl/crypto/bn/add.c",
"third_party/boringssl/crypto/bn/asm/x86_64-gcc.c",
"third_party/boringssl/crypto/bn/bn.c",
"third_party/boringssl/crypto/bn/bn_asn1.c",
"third_party/boringssl/crypto/bn/cmp.c",
"third_party/boringssl/crypto/bn/convert.c",
"third_party/boringssl/crypto/bn/ctx.c",
"third_party/boringssl/crypto/bn/div.c",
"third_party/boringssl/crypto/bn/exponentiation.c",
"third_party/boringssl/crypto/bn/gcd.c",
"third_party/boringssl/crypto/bn/generic.c",
"third_party/boringssl/crypto/bn/kronecker.c",
"third_party/boringssl/crypto/bn/montgomery.c",
"third_party/boringssl/crypto/bn/mul.c",
"third_party/boringssl/crypto/bn/prime.c",
"third_party/boringssl/crypto/bn/random.c",
"third_party/boringssl/crypto/bn/rsaz_exp.c",
"third_party/boringssl/crypto/bn/shift.c",
"third_party/boringssl/crypto/bn/sqrt.c",
"third_party/boringssl/crypto/buf/buf.c",
"third_party/boringssl/crypto/bytestring/ber.c",
"third_party/boringssl/crypto/bytestring/cbb.c",
"third_party/boringssl/crypto/bytestring/cbs.c",
"third_party/boringssl/crypto/chacha/chacha_generic.c",
"third_party/boringssl/crypto/chacha/chacha_vec.c",
"third_party/boringssl/crypto/cipher/aead.c",
"third_party/boringssl/crypto/cipher/cipher.c",
"third_party/boringssl/crypto/cipher/derive_key.c",
"third_party/boringssl/crypto/cipher/e_aes.c",
"third_party/boringssl/crypto/cipher/e_chacha20poly1305.c",
"third_party/boringssl/crypto/cipher/e_des.c",
"third_party/boringssl/crypto/cipher/e_null.c",
"third_party/boringssl/crypto/cipher/e_rc2.c",
"third_party/boringssl/crypto/cipher/e_rc4.c",
"third_party/boringssl/crypto/cipher/e_ssl3.c",
"third_party/boringssl/crypto/cipher/e_tls.c",
"third_party/boringssl/crypto/cipher/tls_cbc.c",
"third_party/boringssl/crypto/cmac/cmac.c",
"third_party/boringssl/crypto/conf/conf.c",
"third_party/boringssl/crypto/cpu-arm.c",
"third_party/boringssl/crypto/cpu-intel.c",
"third_party/boringssl/crypto/crypto.c",
"third_party/boringssl/crypto/curve25519/curve25519.c",
"third_party/boringssl/crypto/des/des.c",
"third_party/boringssl/crypto/dh/check.c",
"third_party/boringssl/crypto/dh/dh.c",
"third_party/boringssl/crypto/dh/dh_asn1.c",
"third_party/boringssl/crypto/dh/params.c",
"third_party/boringssl/crypto/digest/digest.c",
"third_party/boringssl/crypto/digest/digests.c",
"third_party/boringssl/crypto/directory_posix.c",
"third_party/boringssl/crypto/directory_win.c",
"third_party/boringssl/crypto/dsa/dsa.c",
"third_party/boringssl/crypto/dsa/dsa_asn1.c",
"third_party/boringssl/crypto/ec/ec.c",
"third_party/boringssl/crypto/ec/ec_asn1.c",
"third_party/boringssl/crypto/ec/ec_key.c",
"third_party/boringssl/crypto/ec/ec_montgomery.c",
"third_party/boringssl/crypto/ec/oct.c",
"third_party/boringssl/crypto/ec/p224-64.c",
"third_party/boringssl/crypto/ec/p256-64.c",
"third_party/boringssl/crypto/ec/p256-x86_64.c",
"third_party/boringssl/crypto/ec/simple.c",
"third_party/boringssl/crypto/ec/util-64.c",
"third_party/boringssl/crypto/ec/wnaf.c",
"third_party/boringssl/crypto/ecdh/ecdh.c",
"third_party/boringssl/crypto/ecdsa/ecdsa.c",
"third_party/boringssl/crypto/ecdsa/ecdsa_asn1.c",
"third_party/boringssl/crypto/engine/engine.c",
"third_party/boringssl/crypto/err/err.c",
"third_party/boringssl/crypto/evp/algorithm.c",
"third_party/boringssl/crypto/evp/digestsign.c",
"third_party/boringssl/crypto/evp/evp.c",
"third_party/boringssl/crypto/evp/evp_asn1.c",
"third_party/boringssl/crypto/evp/evp_ctx.c",
"third_party/boringssl/crypto/evp/p_dsa_asn1.c",
"third_party/boringssl/crypto/evp/p_ec.c",
"third_party/boringssl/crypto/evp/p_ec_asn1.c",
"third_party/boringssl/crypto/evp/p_rsa.c",
"third_party/boringssl/crypto/evp/p_rsa_asn1.c",
"third_party/boringssl/crypto/evp/pbkdf.c",
"third_party/boringssl/crypto/evp/sign.c",
"third_party/boringssl/crypto/ex_data.c",
"third_party/boringssl/crypto/hkdf/hkdf.c",
"third_party/boringssl/crypto/hmac/hmac.c",
"third_party/boringssl/crypto/lhash/lhash.c",
"third_party/boringssl/crypto/md4/md4.c",
"third_party/boringssl/crypto/md5/md5.c",
"third_party/boringssl/crypto/mem.c",
"third_party/boringssl/crypto/modes/cbc.c",
"third_party/boringssl/crypto/modes/cfb.c",
"third_party/boringssl/crypto/modes/ctr.c",
"third_party/boringssl/crypto/modes/gcm.c",
"third_party/boringssl/crypto/modes/ofb.c",
"third_party/boringssl/crypto/obj/obj.c",
"third_party/boringssl/crypto/obj/obj_xref.c",
"third_party/boringssl/crypto/pem/pem_all.c",
"third_party/boringssl/crypto/pem/pem_info.c",
"third_party/boringssl/crypto/pem/pem_lib.c",
"third_party/boringssl/crypto/pem/pem_oth.c",
"third_party/boringssl/crypto/pem/pem_pk8.c",
"third_party/boringssl/crypto/pem/pem_pkey.c",
"third_party/boringssl/crypto/pem/pem_x509.c",
"third_party/boringssl/crypto/pem/pem_xaux.c",
"third_party/boringssl/crypto/pkcs8/p5_pbe.c",
"third_party/boringssl/crypto/pkcs8/p5_pbev2.c",
"third_party/boringssl/crypto/pkcs8/p8_pkey.c",
"third_party/boringssl/crypto/pkcs8/pkcs8.c",
"third_party/boringssl/crypto/poly1305/poly1305.c",
"third_party/boringssl/crypto/poly1305/poly1305_arm.c",
"third_party/boringssl/crypto/poly1305/poly1305_vec.c",
"third_party/boringssl/crypto/rand/rand.c",
"third_party/boringssl/crypto/rand/urandom.c",
"third_party/boringssl/crypto/rand/windows.c",
"third_party/boringssl/crypto/rc4/rc4.c",
"third_party/boringssl/crypto/refcount_c11.c",
"third_party/boringssl/crypto/refcount_lock.c",
"third_party/boringssl/crypto/rsa/blinding.c",
"third_party/boringssl/crypto/rsa/padding.c",
"third_party/boringssl/crypto/rsa/rsa.c",
"third_party/boringssl/crypto/rsa/rsa_asn1.c",
"third_party/boringssl/crypto/rsa/rsa_impl.c",
"third_party/boringssl/crypto/sha/sha1.c",
"third_party/boringssl/crypto/sha/sha256.c",
"third_party/boringssl/crypto/sha/sha512.c",
"third_party/boringssl/crypto/stack/stack.c",
"third_party/boringssl/crypto/thread.c",
"third_party/boringssl/crypto/thread_none.c",
"third_party/boringssl/crypto/thread_pthread.c",
"third_party/boringssl/crypto/thread_win.c",
"third_party/boringssl/crypto/time_support.c",
"third_party/boringssl/crypto/x509/a_digest.c",
"third_party/boringssl/crypto/x509/a_sign.c",
"third_party/boringssl/crypto/x509/a_strex.c",
"third_party/boringssl/crypto/x509/a_verify.c",
"third_party/boringssl/crypto/x509/asn1_gen.c",
"third_party/boringssl/crypto/x509/by_dir.c",
"third_party/boringssl/crypto/x509/by_file.c",
"third_party/boringssl/crypto/x509/i2d_pr.c",
"third_party/boringssl/crypto/x509/pkcs7.c",
"third_party/boringssl/crypto/x509/t_crl.c",
"third_party/boringssl/crypto/x509/t_req.c",
"third_party/boringssl/crypto/x509/t_x509.c",
"third_party/boringssl/crypto/x509/t_x509a.c",
"third_party/boringssl/crypto/x509/x509.c",
"third_party/boringssl/crypto/x509/x509_att.c",
"third_party/boringssl/crypto/x509/x509_cmp.c",
"third_party/boringssl/crypto/x509/x509_d2.c",
"third_party/boringssl/crypto/x509/x509_def.c",
"third_party/boringssl/crypto/x509/x509_ext.c",
"third_party/boringssl/crypto/x509/x509_lu.c",
"third_party/boringssl/crypto/x509/x509_obj.c",
"third_party/boringssl/crypto/x509/x509_r2x.c",
"third_party/boringssl/crypto/x509/x509_req.c",
"third_party/boringssl/crypto/x509/x509_set.c",
"third_party/boringssl/crypto/x509/x509_trs.c",
"third_party/boringssl/crypto/x509/x509_txt.c",
"third_party/boringssl/crypto/x509/x509_v3.c",
"third_party/boringssl/crypto/x509/x509_vfy.c",
"third_party/boringssl/crypto/x509/x509_vpm.c",
"third_party/boringssl/crypto/x509/x509cset.c",
"third_party/boringssl/crypto/x509/x509name.c",
"third_party/boringssl/crypto/x509/x509rset.c",
"third_party/boringssl/crypto/x509/x509spki.c",
"third_party/boringssl/crypto/x509/x509type.c",
"third_party/boringssl/crypto/x509/x_algor.c",
"third_party/boringssl/crypto/x509/x_all.c",
"third_party/boringssl/crypto/x509/x_attrib.c",
"third_party/boringssl/crypto/x509/x_crl.c",
"third_party/boringssl/crypto/x509/x_exten.c",
"third_party/boringssl/crypto/x509/x_info.c",
"third_party/boringssl/crypto/x509/x_name.c",
"third_party/boringssl/crypto/x509/x_pkey.c",
"third_party/boringssl/crypto/x509/x_pubkey.c",
"third_party/boringssl/crypto/x509/x_req.c",
"third_party/boringssl/crypto/x509/x_sig.c",
"third_party/boringssl/crypto/x509/x_spki.c",
"third_party/boringssl/crypto/x509/x_val.c",
"third_party/boringssl/crypto/x509/x_x509.c",
"third_party/boringssl/crypto/x509/x_x509a.c",
"third_party/boringssl/crypto/x509v3/pcy_cache.c",
"third_party/boringssl/crypto/x509v3/pcy_data.c",
"third_party/boringssl/crypto/x509v3/pcy_lib.c",
"third_party/boringssl/crypto/x509v3/pcy_map.c",
"third_party/boringssl/crypto/x509v3/pcy_node.c",
"third_party/boringssl/crypto/x509v3/pcy_tree.c",
"third_party/boringssl/crypto/x509v3/v3_akey.c",
"third_party/boringssl/crypto/x509v3/v3_akeya.c",
"third_party/boringssl/crypto/x509v3/v3_alt.c",
"third_party/boringssl/crypto/x509v3/v3_bcons.c",
"third_party/boringssl/crypto/x509v3/v3_bitst.c",
"third_party/boringssl/crypto/x509v3/v3_conf.c",
"third_party/boringssl/crypto/x509v3/v3_cpols.c",
"third_party/boringssl/crypto/x509v3/v3_crld.c",
"third_party/boringssl/crypto/x509v3/v3_enum.c",
"third_party/boringssl/crypto/x509v3/v3_extku.c",
"third_party/boringssl/crypto/x509v3/v3_genn.c",
"third_party/boringssl/crypto/x509v3/v3_ia5.c",
"third_party/boringssl/crypto/x509v3/v3_info.c",
"third_party/boringssl/crypto/x509v3/v3_int.c",
"third_party/boringssl/crypto/x509v3/v3_lib.c",
"third_party/boringssl/crypto/x509v3/v3_ncons.c",
"third_party/boringssl/crypto/x509v3/v3_pci.c",
"third_party/boringssl/crypto/x509v3/v3_pcia.c",
"third_party/boringssl/crypto/x509v3/v3_pcons.c",
"third_party/boringssl/crypto/x509v3/v3_pku.c",
"third_party/boringssl/crypto/x509v3/v3_pmaps.c",
"third_party/boringssl/crypto/x509v3/v3_prn.c",
"third_party/boringssl/crypto/x509v3/v3_purp.c",
"third_party/boringssl/crypto/x509v3/v3_skey.c",
"third_party/boringssl/crypto/x509v3/v3_sxnet.c",
"third_party/boringssl/crypto/x509v3/v3_utl.c",
"third_party/boringssl/ssl/custom_extensions.c",
"third_party/boringssl/ssl/d1_both.c",
"third_party/boringssl/ssl/d1_clnt.c",
"third_party/boringssl/ssl/d1_lib.c",
"third_party/boringssl/ssl/d1_meth.c",
"third_party/boringssl/ssl/d1_pkt.c",
"third_party/boringssl/ssl/d1_srtp.c",
"third_party/boringssl/ssl/d1_srvr.c",
"third_party/boringssl/ssl/dtls_record.c",
"third_party/boringssl/ssl/pqueue/pqueue.c",
"third_party/boringssl/ssl/s3_both.c",
"third_party/boringssl/ssl/s3_clnt.c",
"third_party/boringssl/ssl/s3_enc.c",
"third_party/boringssl/ssl/s3_lib.c",
"third_party/boringssl/ssl/s3_meth.c",
"third_party/boringssl/ssl/s3_pkt.c",
"third_party/boringssl/ssl/s3_srvr.c",
"third_party/boringssl/ssl/ssl_aead_ctx.c",
"third_party/boringssl/ssl/ssl_asn1.c",
"third_party/boringssl/ssl/ssl_buffer.c",
"third_party/boringssl/ssl/ssl_cert.c",
"third_party/boringssl/ssl/ssl_cipher.c",
"third_party/boringssl/ssl/ssl_file.c",
"third_party/boringssl/ssl/ssl_lib.c",
"third_party/boringssl/ssl/ssl_rsa.c",
"third_party/boringssl/ssl/ssl_session.c",
"third_party/boringssl/ssl/ssl_stat.c",
"third_party/boringssl/ssl/t1_enc.c",
"third_party/boringssl/ssl/t1_lib.c",
"third_party/boringssl/ssl/tls_record.c",
"include/grpc/support/alloc.h",
"include/grpc/support/atm.h",
"include/grpc/support/atm_gcc_atomic.h",
"include/grpc/support/atm_gcc_sync.h",
"include/grpc/support/atm_win32.h",
"include/grpc/support/avl.h",
"include/grpc/support/cmdline.h",
"include/grpc/support/cpu.h",
"include/grpc/support/histogram.h",
"include/grpc/support/host_port.h",
"include/grpc/support/log.h",
"include/grpc/support/log_win32.h",
"include/grpc/support/port_platform.h",
"include/grpc/support/slice.h",
"include/grpc/support/slice_buffer.h",
"include/grpc/support/string_util.h",
"include/grpc/support/subprocess.h",
"include/grpc/support/sync.h",
"include/grpc/support/sync_generic.h",
"include/grpc/support/sync_posix.h",
"include/grpc/support/sync_win32.h",
"include/grpc/support/thd.h",
"include/grpc/support/time.h",
"include/grpc/support/tls.h",
"include/grpc/support/tls_gcc.h",
"include/grpc/support/tls_msvc.h",
"include/grpc/support/tls_pthread.h",
"include/grpc/support/useful.h",
"include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_win32.h",
"include/grpc/impl/codegen/log.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
"include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_win32.h",
"include/grpc/impl/codegen/time.h",
"src/core/lib/profiling/timers.h",
"src/core/lib/support/backoff.h",
"src/core/lib/support/block_annotate.h",
"src/core/lib/support/env.h",
"src/core/lib/support/load_file.h",
"src/core/lib/support/murmur_hash.h",
"src/core/lib/support/stack_lockfree.h",
"src/core/lib/support/string.h",
"src/core/lib/support/string_win32.h",
"src/core/lib/support/thd_internal.h",
"src/core/lib/support/time_precise.h",
"src/core/lib/support/tmpfile.h",
"src/core/lib/profiling/basic_timers.c",
"src/core/lib/profiling/stap_timers.c",
"src/core/lib/support/alloc.c",
"src/core/lib/support/avl.c",
"src/core/lib/support/backoff.c",
"src/core/lib/support/cmdline.c",
"src/core/lib/support/cpu_iphone.c",
"src/core/lib/support/cpu_linux.c",
"src/core/lib/support/cpu_posix.c",
"src/core/lib/support/cpu_windows.c",
"src/core/lib/support/env_linux.c",
"src/core/lib/support/env_posix.c",
"src/core/lib/support/env_win32.c",
"src/core/lib/support/histogram.c",
"src/core/lib/support/host_port.c",
"src/core/lib/support/load_file.c",
"src/core/lib/support/log.c",
"src/core/lib/support/log_android.c",
"src/core/lib/support/log_linux.c",
"src/core/lib/support/log_posix.c",
"src/core/lib/support/log_win32.c",
"src/core/lib/support/murmur_hash.c",
"src/core/lib/support/slice.c",
"src/core/lib/support/slice_buffer.c",
"src/core/lib/support/stack_lockfree.c",
"src/core/lib/support/string.c",
"src/core/lib/support/string_posix.c",
"src/core/lib/support/string_win32.c",
"src/core/lib/support/subprocess_posix.c",
"src/core/lib/support/subprocess_windows.c",
"src/core/lib/support/sync.c",
"src/core/lib/support/sync_posix.c",
"src/core/lib/support/sync_win32.c",
"src/core/lib/support/thd.c",
"src/core/lib/support/thd_posix.c",
"src/core/lib/support/thd_win32.c",
"src/core/lib/support/time.c",
"src/core/lib/support/time_posix.c",
"src/core/lib/support/time_precise.c",
"src/core/lib/support/time_win32.c",
"src/core/lib/support/tls_pthread.c",
"src/core/lib/support/tmpfile_posix.c",
"src/core/lib/support/tmpfile_win32.c",
"src/core/lib/support/wrap_memcpy.c",
"src/node/src",
"src/node/ext",
"include/grpc",
"src/core",
"third_party/nanopb",
"third_party/zlib",
"third_party/boringssl",
"binding.gyp"
],
"main": "src/node/index.js",

@ -1159,6 +1159,10 @@ static void cancel_from_api(grpc_exec_ctx *exec_ctx,
grpc_chttp2_fake_status(exec_ctx, transport_global, stream_global, status,
NULL);
}
if (status != GRPC_STATUS_OK && !stream_global->seen_error) {
stream_global->seen_error = 1;
grpc_chttp2_list_add_check_read_ops(transport_global, stream_global);
}
grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, 1,
1);
}

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit.Runners" version="2.6.4" />
<package id="NUnit.ConsoleRunner" version="3.2.0" />
<package id="OpenCover" version="4.6.519" />
<package id="ReportGenerator" version="2.4.4.0" />
</packages>

@ -70,7 +70,7 @@ namespace Grpc.Core.Tests
public void WaitForStateChangedAsync_InvalidArgument()
{
var channel = new Channel("localhost", ChannelCredentials.Insecure);
Assert.Throws(typeof(ArgumentException), () => channel.WaitForStateChangedAsync(ChannelState.FatalFailure));
Assert.ThrowsAsync(typeof(ArgumentException), async () => await channel.WaitForStateChangedAsync(ChannelState.FatalFailure));
channel.ShutdownAsync().Wait();
}
@ -87,7 +87,7 @@ namespace Grpc.Core.Tests
{
var channel = new Channel("localhost", ChannelCredentials.Insecure);
channel.ShutdownAsync().Wait();
Assert.Throws(typeof(InvalidOperationException), () => channel.ShutdownAsync().GetAwaiter().GetResult());
Assert.ThrowsAsync(typeof(InvalidOperationException), async () => await channel.ShutdownAsync());
}
}
}

@ -93,7 +93,7 @@ namespace Grpc.Core.Tests
var ex = Assert.Throws<RpcException>(() => Calls.BlockingUnaryCall(helper.CreateUnaryCall(), "abc"));
Assert.AreEqual(StatusCode.Unknown, ex.Status.StatusCode);
var ex2 = Assert.Throws<RpcException>(async () => await Calls.AsyncUnaryCall(helper.CreateUnaryCall(), "abc"));
var ex2 = Assert.ThrowsAsync<RpcException>(async () => await Calls.AsyncUnaryCall(helper.CreateUnaryCall(), "abc"));
Assert.AreEqual(StatusCode.Unknown, ex2.Status.StatusCode);
}
@ -108,7 +108,7 @@ namespace Grpc.Core.Tests
var ex = Assert.Throws<RpcException>(() => Calls.BlockingUnaryCall(helper.CreateUnaryCall(), "abc"));
Assert.AreEqual(StatusCode.Unauthenticated, ex.Status.StatusCode);
var ex2 = Assert.Throws<RpcException>(async () => await Calls.AsyncUnaryCall(helper.CreateUnaryCall(), "abc"));
var ex2 = Assert.ThrowsAsync<RpcException>(async () => await Calls.AsyncUnaryCall(helper.CreateUnaryCall(), "abc"));
Assert.AreEqual(StatusCode.Unauthenticated, ex2.Status.StatusCode);
}
@ -124,7 +124,7 @@ namespace Grpc.Core.Tests
var ex = Assert.Throws<RpcException>(() => Calls.BlockingUnaryCall(helper.CreateUnaryCall(), "abc"));
Assert.AreEqual(StatusCode.Unauthenticated, ex.Status.StatusCode);
var ex2 = Assert.Throws<RpcException>(async () => await Calls.AsyncUnaryCall(helper.CreateUnaryCall(), "abc"));
var ex2 = Assert.ThrowsAsync<RpcException>(async () => await Calls.AsyncUnaryCall(helper.CreateUnaryCall(), "abc"));
Assert.AreEqual(StatusCode.Unauthenticated, ex2.Status.StatusCode);
}
@ -204,7 +204,7 @@ namespace Grpc.Core.Tests
await barrier.Task; // make sure the handler has started.
cts.Cancel();
var ex = Assert.Throws<RpcException>(async () => await call.ResponseAsync);
var ex = Assert.ThrowsAsync<RpcException>(async () => await call.ResponseAsync);
Assert.AreEqual(StatusCode.Cancelled, ex.Status.StatusCode);
}
@ -290,7 +290,7 @@ namespace Grpc.Core.Tests
return request;
});
Assert.Throws(typeof(TaskCanceledException),
Assert.ThrowsAsync(typeof(TaskCanceledException),
async () => await channel.WaitForStateChangedAsync(channel.State, DateTime.UtcNow.AddMilliseconds(10)));
var stateChangedTask = channel.WaitForStateChangedAsync(channel.State);

@ -105,7 +105,7 @@ namespace Grpc.Core.Tests
var parentCall = Calls.AsyncClientStreamingCall(helper.CreateClientStreamingCall(new CallOptions(cancellationToken: cts.Token)));
await readyToCancelTcs.Task;
cts.Cancel();
Assert.Throws(typeof(RpcException), async () => await parentCall);
Assert.ThrowsAsync(typeof(RpcException), async () => await parentCall);
Assert.AreEqual("CHILD_CALL_CANCELLED", await successTcs.Task);
}

@ -4,7 +4,7 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{86EC5CB4-4EA2-40A2-8057-86542A0353BB}</ProjectGuid>
<OutputType>Library</OutputType>
<OutputType>Exe</OutputType>
<RootNamespace>Grpc.Core.Tests</RootNamespace>
<AssemblyName>Grpc.Core.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
@ -35,29 +35,18 @@
<AssemblyOriginatorKeyFile>..\keys\Grpc.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.core">
<HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\nunit.core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="nunit.core.interfaces">
<HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\nunit.core.interfaces.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<HintPath>..\packages\NUnit.3.2.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="nunit.util">
<HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\nunit.util.dll</HintPath>
<Private>False</Private>
<Reference Include="System.Interactive.Async">
<HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
<Reference Include="NUnit.VisualStudio.TestAdapter">
<HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\NUnit.VisualStudio.TestAdapter.dll</HintPath>
<Private>False</Private>
<Reference Include="nunitlite">
<HintPath>..\packages\NUnitLite.3.2.0\lib\net45\nunitlite.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@ -94,6 +83,7 @@
<Compile Include="PerformanceTest.cs" />
<Compile Include="SanityTest.cs" />
<Compile Include="HalfcloseTest.cs" />
<Compile Include="NUnitMain.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>

@ -91,7 +91,7 @@ namespace Grpc.Core.Tests
await call.RequestStream.CompleteAsync();
// Second attempt to close from client is not allowed.
Assert.Throws(typeof(InvalidOperationException), async () => await call.RequestStream.CompleteAsync());
Assert.ThrowsAsync(typeof(InvalidOperationException), async () => await call.RequestStream.CompleteAsync());
}
}
}

@ -84,7 +84,7 @@ namespace Grpc.Core.Internal.Tests
Assert.AreEqual(StatusCode.Internal, asyncCall.GetStatus().StatusCode);
Assert.IsNull(asyncCall.GetTrailers());
var ex = Assert.Throws<RpcException>(() => resultTask.GetAwaiter().GetResult());
var ex = Assert.ThrowsAsync<RpcException>(async () => await resultTask);
Assert.AreEqual(StatusCode.Internal, ex.Status.StatusCode);
}

@ -112,7 +112,7 @@ namespace Grpc.Core.Tests
});
var call = Calls.AsyncServerStreamingCall(helper.CreateServerStreamingCall(), "REQUEST");
var ex = Assert.Throws<RpcException>(async () => await call.ResponseStream.MoveNext());
var ex = Assert.ThrowsAsync<RpcException>(async () => await call.ResponseStream.MoveNext());
Assert.AreEqual(StatusCode.Internal, ex.Status.StatusCode);
}
@ -134,7 +134,7 @@ namespace Grpc.Core.Tests
{
helper.ClientStreamingHandler = new ClientStreamingServerMethod<string, string>(async (requestStream, context) =>
{
Assert.Throws<IOException>(async () => await requestStream.MoveNext());
Assert.ThrowsAsync<IOException>(async () => await requestStream.MoveNext());
return "RESPONSE";
});
@ -153,7 +153,7 @@ namespace Grpc.Core.Tests
[Test]
public void RequestSerializationError_AsyncUnary()
{
Assert.Throws<IOException>(async () => await Calls.AsyncUnaryCall(helper.CreateUnaryCall(), "UNSERIALIZABLE_VALUE"));
Assert.ThrowsAsync<IOException>(async () => await Calls.AsyncUnaryCall(helper.CreateUnaryCall(), "UNSERIALIZABLE_VALUE"));
}
[Test]
@ -166,7 +166,7 @@ namespace Grpc.Core.Tests
});
var call = Calls.AsyncClientStreamingCall(helper.CreateClientStreamingCall());
await call.RequestStream.WriteAsync("A");
Assert.Throws<IOException>(async () => await call.RequestStream.WriteAsync("UNSERIALIZABLE_VALUE"));
Assert.ThrowsAsync<IOException>(async () => await call.RequestStream.WriteAsync("UNSERIALIZABLE_VALUE"));
await call.RequestStream.WriteAsync("B");
await call.RequestStream.CompleteAsync();

@ -0,0 +1,59 @@
#region Copyright notice and license
// Copyright 2016, 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.
#endregion
using System;
using System.Reflection;
using Grpc.Core;
using Grpc.Core.Logging;
using NUnit.Common;
using NUnitLite;
namespace Grpc.Core.Tests
{
/// <summary>
/// Provides entry point for NUnitLite
/// </summary>
public class NUnitMain
{
public static int Main(string[] args)
{
// Make logger immune to NUnit capturing stdout and stderr to workaround https://github.com/nunit/nunit/issues/1406.
GrpcEnvironment.SetLogger(new TextWriterLogger(Console.Error));
#if DOTNET5_4
return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In);
#else
return new AutoRun().Execute(args);
#endif
}
}
}

@ -155,7 +155,7 @@ namespace Grpc.Core.Tests
{
helper.UnaryHandler = new UnaryServerMethod<string, string>(async (request, context) =>
{
Assert.Throws(typeof(ArgumentNullException), async () => await context.WriteResponseHeadersAsync(null));
Assert.ThrowsAsync(typeof(ArgumentNullException), async () => await context.WriteResponseHeadersAsync(null));
return "PASS";
});

@ -38,6 +38,7 @@ using System.Reflection;
using Grpc.Core;
using Grpc.Core.Internal;
using Grpc.Core.Utils;
using Newtonsoft.Json;
using NUnit.Framework;
namespace Grpc.Core.Tests
@ -55,27 +56,23 @@ namespace Grpc.Core.Tests
[Test]
public void TestsJsonUpToDate()
{
var testClasses = DiscoverAllTestClasses();
string testsJson = GetTestsJson();
var discoveredTests = DiscoverAllTestClasses();
string discoveredTestsJson = JsonConvert.SerializeObject(discoveredTests, Formatting.Indented);
// we don't have a JSON parser at hand, but check that the test class
// name is contained in the file instead.
foreach (var className in testClasses) {
Assert.IsTrue(testsJson.Contains(className),
string.Format("Test class \"{0}\" is missing in C# tests.json file", className));
}
Assert.AreEqual(discoveredTestsJson, ReadTestsJson());
}
/// <summary>
/// Gets list of all test classes obtained by inspecting all the test assemblies.
/// </summary>
private List<string> DiscoverAllTestClasses()
private Dictionary<string, List<string>> DiscoverAllTestClasses()
{
var assemblies = GetTestAssemblies();
var testClasses = new List<string>();
var testsByAssembly = new Dictionary<string, List<string>>();
foreach (var assembly in assemblies)
{
var testClasses = new List<string>();
foreach (var t in assembly.GetTypes())
{
foreach (var m in t.GetMethods())
@ -89,16 +86,19 @@ namespace Grpc.Core.Tests
}
}
testClasses.Sort();
testsByAssembly.Add(assembly.GetName().Name, testClasses);
}
testClasses.Sort();
return testClasses;
return testsByAssembly;
}
private string GetTestsJson()
/// <summary>
/// Reads contents of tests.json file.
/// </summary>
private string ReadTestsJson()
{
var assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var testsJsonFile = Path.Combine(assemblyDir, "..", "..", "..", "tests.json");
return File.ReadAllText(testsJsonFile);
}

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Ix-Async" version="1.2.5" targetFramework="net45" />
<package id="NUnit" version="2.6.4" targetFramework="net45" />
<package id="NUnitTestAdapter" version="2.0.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="NUnit" version="3.2.0" targetFramework="net45" />
<package id="NUnitLite" version="3.2.0" targetFramework="net45" />
</packages>

@ -58,6 +58,7 @@
<Compile Include="IServerStreamWriter.cs" />
<Compile Include="IAsyncStreamWriter.cs" />
<Compile Include="IAsyncStreamReader.cs" />
<Compile Include="Logging\TextWriterLogger.cs" />
<Compile Include="Logging\NullLogger.cs" />
<Compile Include="ServerPort.cs" />
<Compile Include="Version.cs" />
@ -140,9 +141,7 @@
</ItemGroup>
<Import Project="NativeDeps.targets" />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<EmbeddedResource Include="..\..\..\etc\roots.pem">
<Link>Resources\roots.pem</Link>

@ -16,7 +16,6 @@
<tags>gRPC RPC Protocol HTTP/2</tags>
<dependencies>
<dependency id="Ix-Async" version="1.2.5" />
<dependency id="grpc.native.csharp" version="$version$" />
</dependencies>
</metadata>
<files>
@ -24,5 +23,12 @@
<file src="bin/ReleaseSigned/Grpc.Core.pdb" target="lib/net45" />
<file src="bin/ReleaseSigned/Grpc.Core.xml" target="lib/net45" />
<file src="**\*.cs" target="src" />
<file src="Grpc.Core.targets" target="\build\net45\Grpc.Core.targets" />
<file src="windows_x86/grpc_csharp_ext.dll" target="/build/native/bin/windows_x86/grpc_csharp_ext.dll" />
<file src="windows_x64/grpc_csharp_ext.dll" target="/build/native/bin/windows_x64/grpc_csharp_ext.dll" />
<file src="linux_x86/libgrpc_csharp_ext.so" target="/build/native/bin/linux_x86/libgrpc_csharp_ext.so" />
<file src="linux_x64/libgrpc_csharp_ext.so" target="/build/native/bin/linux_x64/libgrpc_csharp_ext.so" />
<file src="macosx_x86/libgrpc_csharp_ext.dylib" target="/build/native/bin/macosx_x86/libgrpc_csharp_ext.dylib" />
<file src="macosx_x64/libgrpc_csharp_ext.dylib" target="/build/native/bin/macosx_x64/libgrpc_csharp_ext.dylib" />
</files>
</package>

@ -32,7 +32,6 @@
#endregion
using System;
using System.Globalization;
using System.IO;
using System.Reflection;
@ -46,6 +45,7 @@ namespace Grpc.Core.Internal
internal sealed class NativeExtension
{
const string NativeLibrariesDir = "nativelibs";
const string DnxStyleNativeLibrariesDir = "../../build/native/bin/";
static readonly ILogger Logger = GrpcEnvironment.Logger.ForType<NativeExtension>();
static readonly object staticLock = new object();
@ -100,31 +100,48 @@ namespace Grpc.Core.Internal
// TODO: allow customizing path to native extension (possibly through exposing a GrpcEnvironment property).
var libraryFlavor = string.Format("{0}_{1}", GetPlatformString(), GetArchitectureString());
var fullPath = Path.Combine(Path.GetDirectoryName(GetAssemblyPath()),
NativeLibrariesDir, libraryFlavor, GetNativeLibraryFilename());
return new UnmanagedLibrary(fullPath);
var assemblyDirectory = Path.GetDirectoryName(GetAssemblyPath());
// With old-style VS projects, the native libraries get copied using a .targets rule to the build output folder
// alongside the compiled assembly.
var classicPath = Path.Combine(assemblyDirectory, NativeLibrariesDir, libraryFlavor, GetNativeLibraryFilename());
// DNX-style project.json projects will use Grpc.Core assembly directly in the location where it got restored
// by nuget. We locate the native libraries based on known structure of Grpc.Core nuget package.
var dnxStylePath = Path.Combine(assemblyDirectory, DnxStyleNativeLibrariesDir, libraryFlavor, GetNativeLibraryFilename());
return new UnmanagedLibrary(new string[] {classicPath, dnxStylePath});
}
private static string GetAssemblyPath()
{
var assembly = typeof(NativeExtension).GetTypeInfo().Assembly;
#if DOTNET5_4
// Assembly.EscapedCodeBase does not exit under CoreCLR, but assemblies imported from a nuget package
// don't seem to be shadowed by DNX-based projects at all.
return assembly.Location;
#else
// If assembly is shadowed (e.g. in a webapp), EscapedCodeBase is pointing
// to the original location of the assembly, and Location is pointing
// to the shadow copy. We care about the original location because
// the native dlls don't get shadowed.
var escapedCodeBase = assembly.EscapedCodeBase;
if (IsFileUri(escapedCodeBase))
{
return new Uri(escapedCodeBase).LocalPath;
}
return assembly.Location;
#endif
}
#if !DOTNET5_4
private static bool IsFileUri(string uri)
{
return uri.ToLowerInvariant().StartsWith(Uri.UriSchemeFile);
}
#endif
private static string GetPlatformString()
{

@ -32,8 +32,6 @@
#endregion
using System;
using System.Collections.Concurrent;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
@ -63,14 +61,9 @@ namespace Grpc.Core.Internal
readonly string libraryPath;
readonly IntPtr handle;
public UnmanagedLibrary(string libraryPath)
public UnmanagedLibrary(string[] libraryPathAlternatives)
{
this.libraryPath = GrpcPreconditions.CheckNotNull(libraryPath);
if (!File.Exists(this.libraryPath))
{
throw new FileNotFoundException("Error loading native library. File does not exist.", this.libraryPath);
}
this.libraryPath = FirstValidLibraryPath(libraryPathAlternatives);
Logger.Debug("Attempting to load native library \"{0}\"", this.libraryPath);
@ -139,6 +132,19 @@ namespace Grpc.Core.Internal
throw new InvalidOperationException("Unsupported platform.");
}
private static string FirstValidLibraryPath(string[] libraryPathAlternatives)
{
GrpcPreconditions.CheckArgument(libraryPathAlternatives.Length > 0, "libraryPathAlternatives cannot be empty.");
foreach (var path in libraryPathAlternatives)
{
if (File.Exists(path))
{
return path;
}
}
throw new FileNotFoundException(String.Format("Error loading native library. Not found in any of the possible locations {0}", libraryPathAlternatives));
}
private static class Windows
{
[DllImport("kernel32.dll")]

@ -38,117 +38,28 @@ using System.Globalization;
namespace Grpc.Core.Logging
{
/// <summary>Logger that logs to System.Console.</summary>
public class ConsoleLogger : ILogger
public class ConsoleLogger : TextWriterLogger
{
// Format similar enough to C core log format except nanosecond precision is not supported.
const string DateTimeFormatString = "MMdd HH:mm:ss.ffffff";
readonly Type forType;
readonly string forTypeString;
/// <summary>Creates a console logger not associated to any specific type.</summary>
public ConsoleLogger() : this(null)
{
}
/// <summary>Creates a console logger that logs messsage specific for given type.</summary>
private ConsoleLogger(Type forType)
private ConsoleLogger(Type forType) : base(() => Console.Error, forType)
{
this.forType = forType;
if (forType != null)
{
var namespaceStr = forType.Namespace ?? "";
if (namespaceStr.Length > 0)
{
namespaceStr += ".";
}
this.forTypeString = namespaceStr + forType.Name + " ";
}
else
{
this.forTypeString = "";
}
}
/// <summary>
/// Returns a logger associated with the specified type.
/// </summary>
public ILogger ForType<T>()
public override ILogger ForType<T>()
{
if (typeof(T) == forType)
if (typeof(T) == AssociatedType)
{
return this;
}
return new ConsoleLogger(typeof(T));
}
/// <summary>Logs a message with severity Debug.</summary>
public void Debug(string message)
{
Log("D", message);
}
/// <summary>Logs a formatted message with severity Debug.</summary>
public void Debug(string format, params object[] formatArgs)
{
Debug(string.Format(format, formatArgs));
}
/// <summary>Logs a message with severity Info.</summary>
public void Info(string message)
{
Log("I", message);
}
/// <summary>Logs a formatted message with severity Info.</summary>
public void Info(string format, params object[] formatArgs)
{
Info(string.Format(format, formatArgs));
}
/// <summary>Logs a message with severity Warning.</summary>
public void Warning(string message)
{
Log("W", message);
}
/// <summary>Logs a formatted message with severity Warning.</summary>
public void Warning(string format, params object[] formatArgs)
{
Warning(string.Format(format, formatArgs));
}
/// <summary>Logs a message and an associated exception with severity Warning.</summary>
public void Warning(Exception exception, string message)
{
Warning(message + " " + exception);
}
/// <summary>Logs a message with severity Error.</summary>
public void Error(string message)
{
Log("E", message);
}
/// <summary>Logs a formatted message with severity Error.</summary>
public void Error(string format, params object[] formatArgs)
{
Error(string.Format(format, formatArgs));
}
/// <summary>Logs a message and an associated exception with severity Error.</summary>
public void Error(Exception exception, string message)
{
Error(message + " " + exception);
}
private void Log(string severityString, string message)
{
Console.Error.WriteLine("{0}{1} {2}{3}",
severityString,
DateTime.Now.ToString(DateTimeFormatString, CultureInfo.InvariantCulture),
forTypeString,
message);
}
}
}

@ -0,0 +1,176 @@
#region Copyright notice and license
// 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.
#endregion
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using Grpc.Core.Utils;
namespace Grpc.Core.Logging
{
/// <summary>Logger that logs to an arbitrary <c>System.IO.TextWriter</c>.</summary>
public class TextWriterLogger : ILogger
{
// Format similar enough to C core log format except nanosecond precision is not supported.
const string DateTimeFormatString = "MMdd HH:mm:ss.ffffff";
readonly Func<TextWriter> textWriterProvider;
readonly Type forType;
readonly string forTypeString;
/// <summary>
/// Creates a console logger not associated to any specific type and writes to given <c>System.IO.TextWriter</c>.
/// User is responsible for providing an instance of TextWriter that is thread-safe.
/// </summary>
public TextWriterLogger(TextWriter textWriter) : this(() => textWriter)
{
GrpcPreconditions.CheckNotNull(textWriter);
}
/// <summary>
/// Creates a console logger not associated to any specific type and writes to a <c>System.IO.TextWriter</c> obtained from given provider.
/// User is responsible for providing an instance of TextWriter that is thread-safe.
/// </summary>
public TextWriterLogger(Func<TextWriter> textWriterProvider) : this(textWriterProvider, null)
{
}
/// <summary>Creates a console logger that logs messsage specific for given type.</summary>
protected TextWriterLogger(Func<TextWriter> textWriterProvider, Type forType)
{
this.textWriterProvider = GrpcPreconditions.CheckNotNull(textWriterProvider);
this.forType = forType;
if (forType != null)
{
var namespaceStr = forType.Namespace ?? "";
if (namespaceStr.Length > 0)
{
namespaceStr += ".";
}
this.forTypeString = namespaceStr + forType.Name + " ";
}
else
{
this.forTypeString = "";
}
}
/// <summary>
/// Returns a logger associated with the specified type.
/// </summary>
public virtual ILogger ForType<T>()
{
if (typeof(T) == forType)
{
return this;
}
return new TextWriterLogger(this.textWriterProvider, typeof(T));
}
/// <summary>Logs a message with severity Debug.</summary>
public void Debug(string message)
{
Log("D", message);
}
/// <summary>Logs a formatted message with severity Debug.</summary>
public void Debug(string format, params object[] formatArgs)
{
Debug(string.Format(format, formatArgs));
}
/// <summary>Logs a message with severity Info.</summary>
public void Info(string message)
{
Log("I", message);
}
/// <summary>Logs a formatted message with severity Info.</summary>
public void Info(string format, params object[] formatArgs)
{
Info(string.Format(format, formatArgs));
}
/// <summary>Logs a message with severity Warning.</summary>
public void Warning(string message)
{
Log("W", message);
}
/// <summary>Logs a formatted message with severity Warning.</summary>
public void Warning(string format, params object[] formatArgs)
{
Warning(string.Format(format, formatArgs));
}
/// <summary>Logs a message and an associated exception with severity Warning.</summary>
public void Warning(Exception exception, string message)
{
Warning(message + " " + exception);
}
/// <summary>Logs a message with severity Error.</summary>
public void Error(string message)
{
Log("E", message);
}
/// <summary>Logs a formatted message with severity Error.</summary>
public void Error(string format, params object[] formatArgs)
{
Error(string.Format(format, formatArgs));
}
/// <summary>Logs a message and an associated exception with severity Error.</summary>
public void Error(Exception exception, string message)
{
Error(message + " " + exception);
}
/// <summary>Gets the type associated with this logger.</summary>
protected Type AssociatedType
{
get { return forType; }
}
private void Log(string severityString, string message)
{
textWriterProvider().WriteLine("{0}{1} {2}{3}",
severityString,
DateTime.Now.ToString(DateTimeFormatString, CultureInfo.InvariantCulture),
forTypeString,
message);
}
}
}

@ -3,10 +3,8 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{143B1C29-C442-4BE0-BF3F-A8F92288AC9F}</ProjectGuid>
<OutputType>Library</OutputType>
<OutputType>Exe</OutputType>
<RootNamespace>Grpc.Examples.Tests</RootNamespace>
<AssemblyName>Grpc.Examples.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
@ -37,18 +35,19 @@
<AssemblyOriginatorKeyFile>..\keys\Grpc.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="System" />
<Reference Include="Google.Protobuf">
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<HintPath>..\packages\NUnit.3.2.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="System.Interactive.Async">
<HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
<Reference Include="nunitlite">
<HintPath>..\packages\NUnitLite.3.2.0\lib\net45\nunitlite.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Grpc.Core\Version.cs">
@ -56,6 +55,7 @@
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="MathClientServerTests.cs" />
<Compile Include="NUnitMain.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>

@ -149,7 +149,7 @@ namespace Math.Tests
using (var call = client.Fib(new FibArgs { Limit = 0 },
deadline: DateTime.UtcNow.AddMilliseconds(500)))
{
var ex = Assert.Throws<RpcException>(async () => await call.ResponseStream.ToListAsync());
var ex = Assert.ThrowsAsync<RpcException>(async () => await call.ResponseStream.ToListAsync());
// We can't guarantee the status code always DeadlineExceeded. See issue #2685.
Assert.Contains(ex.Status.StatusCode, new[] { StatusCode.DeadlineExceeded, StatusCode.Internal });

@ -0,0 +1,59 @@
#region Copyright notice and license
// Copyright 2016, 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.
#endregion
using System;
using System.Reflection;
using Grpc.Core;
using Grpc.Core.Logging;
using NUnit.Common;
using NUnitLite;
namespace Grpc.Examples.Tests
{
/// <summary>
/// Provides entry point for NUnitLite
/// </summary>
public class NUnitMain
{
public static int Main(string[] args)
{
// Make logger immune to NUnit capturing stdout and stderr to workaround https://github.com/nunit/nunit/issues/1406.
GrpcEnvironment.SetLogger(new TextWriterLogger(Console.Error));
#if DOTNET5_4
return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In);
#else
return new AutoRun().Execute(args);
#endif
}
}
}

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" />
<package id="NUnit" version="2.6.4" targetFramework="net45" />
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" />
<package id="NUnit" version="3.2.0" targetFramework="net45" />
<package id="NUnitLite" version="3.2.0" targetFramework="net45" />
</packages>

@ -41,6 +41,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.3.2.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data.Linq" />
<Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

@ -2,5 +2,5 @@
<packages>
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" />
<package id="NUnit" version="2.6.4" targetFramework="net45" />
<package id="NUnit" version="3.2.0" targetFramework="net45" />
</packages>

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F8C6D937-C44B-4EE3-A431-B0FBAEACE47D}</ProjectGuid>
<OutputType>Library</OutputType>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Grpc.HealthCheck.Tests</RootNamespace>
<AssemblyName>Grpc.HealthCheck.Tests</AssemblyName>
@ -37,13 +37,6 @@
<AssemblyOriginatorKeyFile>..\keys\Grpc.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
@ -51,6 +44,15 @@
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Google.Protobuf">
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.3.2.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="nunitlite">
<HintPath>..\packages\NUnitLite.3.2.0\lib\net45\nunitlite.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Grpc.Core\Version.cs">
@ -59,14 +61,15 @@
<Compile Include="HealthServiceImplTest.cs" />
<Compile Include="HealthClientServerTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="NUnitMain.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Grpc.Core\Grpc.Core.csproj">
<Project>{ccc4440e-49f7-4790-b0af-feabb0837ae7}</Project>
<Project>{CCC4440E-49F7-4790-B0AF-FEABB0837AE7}</Project>
<Name>Grpc.Core</Name>
</ProjectReference>
<ProjectReference Include="..\Grpc.HealthCheck\Grpc.HealthCheck.csproj">
<Project>{aa5e328a-8835-49d7-98ed-c29f2b3049f0}</Project>
<Project>{AA5E328A-8835-49D7-98ED-C29F2B3049F0}</Project>
<Name>Grpc.HealthCheck</Name>
</ProjectReference>
</ItemGroup>

@ -0,0 +1,59 @@
#region Copyright notice and license
// Copyright 2016, 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.
#endregion
using System;
using System.Reflection;
using Grpc.Core;
using Grpc.Core.Logging;
using NUnit.Common;
using NUnitLite;
namespace Grpc.HealthCheck.Tests
{
/// <summary>
/// Provides entry point for NUnitLite
/// </summary>
public class NUnitMain
{
public static int Main(string[] args)
{
// Make logger immune to NUnit capturing stdout and stderr to workaround https://github.com/nunit/nunit/issues/1406.
GrpcEnvironment.SetLogger(new TextWriterLogger(Console.Error));
#if DOTNET5_4
return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In);
#else
return new AutoRun().Execute(args);
#endif
}
}
}

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" />
<package id="NUnit" version="2.6.4" targetFramework="net45" />
<package id="NUnit" version="3.2.0" targetFramework="net45" />
<package id="NUnitLite" version="3.2.0" targetFramework="net45" />
</packages>

@ -84,7 +84,7 @@ namespace Grpc.IntegrationTesting
{
var call = client.StreamingInputCall();
var ex = Assert.Throws<RpcException>(async () => await call);
var ex = Assert.ThrowsAsync<RpcException>(async () => await call);
Assert.AreEqual(StatusCode.Unimplemented, ex.Status.StatusCode);
}
@ -93,7 +93,7 @@ namespace Grpc.IntegrationTesting
{
var call = client.StreamingOutputCall(new StreamingOutputCallRequest());
var ex = Assert.Throws<RpcException>(async () => await call.ResponseStream.MoveNext());
var ex = Assert.ThrowsAsync<RpcException>(async () => await call.ResponseStream.MoveNext());
Assert.AreEqual(StatusCode.Unimplemented, ex.Status.StatusCode);
}
@ -102,7 +102,7 @@ namespace Grpc.IntegrationTesting
{
var call = client.FullDuplexCall();
var ex = Assert.Throws<RpcException>(async () => await call.ResponseStream.MoveNext());
var ex = Assert.ThrowsAsync<RpcException>(async () => await call.ResponseStream.MoveNext());
Assert.AreEqual(StatusCode.Unimplemented, ex.Status.StatusCode);
}

@ -4,7 +4,7 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C61154BA-DD4A-4838-8420-0162A28925E0}</ProjectGuid>
<OutputType>Library</OutputType>
<OutputType>Exe</OutputType>
<RootNamespace>Grpc.IntegrationTesting</RootNamespace>
<AssemblyName>Grpc.IntegrationTesting</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
@ -38,47 +38,43 @@
<AssemblyOriginatorKeyFile>..\keys\Grpc.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.7.4137.9688, Culture=neutral, PublicKeyToken=a4292a325f69b123, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\BouncyCastle.1.7.0\lib\Net40-Client\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="CommandLine">
<HintPath>..\packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll</HintPath>
</Reference>
<Reference Include="Google.Apis.Auth, Version=1.11.1.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="Moq">
<HintPath>..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="BouncyCastle.Crypto">
<HintPath>..\packages\BouncyCastle.1.7.0\lib\Net40-Client\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="Google.Apis.Auth">
<HintPath>..\packages\Google.Apis.Auth.1.11.1\lib\net45\Google.Apis.Auth.dll</HintPath>
</Reference>
<Reference Include="Google.Apis.Auth.PlatformServices, Version=1.11.1.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="Google.Apis.Auth.PlatformServices">
<HintPath>..\packages\Google.Apis.Auth.1.11.1\lib\net45\Google.Apis.Auth.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="Google.Apis.Core, Version=1.11.1.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="Google.Apis.Core">
<HintPath>..\packages\Google.Apis.Core.1.11.1\lib\net45\Google.Apis.Core.dll</HintPath>
</Reference>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="Google.Protobuf">
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Moq">
<HintPath>..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<HintPath>..\packages\NUnit.3.2.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="System.Interactive.Async">
<HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="nunitlite">
<HintPath>..\packages\NUnitLite.3.2.0\lib\net45\nunitlite.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Grpc.Core\Version.cs">
@ -116,6 +112,7 @@
<Compile Include="GeneratedServiceBaseTest.cs" />
<Compile Include="GeneratedClientTest.cs" />
<Compile Include="InterarrivalTimers.cs" />
<Compile Include="NUnitMain.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>

@ -1,113 +0,0 @@
#region Copyright notice and license
// 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.
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Grpc.Core;
using Grpc.Core.Utils;
using Grpc.Testing;
using NUnit.Framework;
namespace Grpc.IntegrationTesting
{
public class HeaderInterceptorTest
{
const string Host = "localhost";
Server server;
Channel channel;
TestService.TestServiceClient client;
[TestFixtureSetUp]
public void Init()
{
server = new Server
{
Services = { TestService.BindService(new TestServiceImpl()) },
Ports = { { Host, ServerPort.PickUnused, ServerCredentials.Insecure } }
};
server.Start();
channel = new Channel(Host, server.Ports.Single().BoundPort, ChannelCredentials.Insecure);
client = TestService.NewClient(channel);
}
[TestFixtureTearDown]
public void Cleanup()
{
channel.ShutdownAsync().Wait();
server.ShutdownAsync().Wait();
}
[Test]
public async Task HeaderInterceptor_CreateMetadata()
{
var key = "x-grpc-test-echo-initial";
client.HeaderInterceptor = new HeaderInterceptor((method, metadata) =>
{
metadata.Add(key, "ABC");
});
var call = client.UnaryCallAsync(new SimpleRequest());
await call;
var responseHeaders = await call.ResponseHeadersAsync;
Assert.AreEqual("ABC", responseHeaders.First((entry) => entry.Key == key).Value);
}
[Test]
public async Task HeaderInterceptor_AppendMetadata()
{
var initialKey = "x-grpc-test-echo-initial";
var trailingKey = "x-grpc-test-echo-trailing-bin";
client.HeaderInterceptor = new HeaderInterceptor((method, metadata) =>
{
metadata.Add(initialKey, "ABC");
});
var headers = new Metadata
{
{ trailingKey, new byte[] {0xaa} }
};
var call = client.UnaryCallAsync(new SimpleRequest(), headers: headers);
await call;
var responseHeaders = await call.ResponseHeadersAsync;
Assert.AreEqual("ABC", responseHeaders.First((entry) => entry.Key == initialKey).Value);
CollectionAssert.AreEqual(new byte[] {0xaa}, call.GetTrailers().First((entry) => entry.Key == trailingKey).ValueBytes);
}
}
}

@ -445,7 +445,7 @@ namespace Grpc.IntegrationTesting
await Task.Delay(1000);
cts.Cancel();
var ex = Assert.Throws<RpcException>(async () => await call.ResponseAsync);
var ex = Assert.ThrowsAsync<RpcException>(async () => await call.ResponseAsync);
Assert.AreEqual(StatusCode.Cancelled, ex.Status.StatusCode);
}
Console.WriteLine("Passed!");
@ -471,7 +471,7 @@ namespace Grpc.IntegrationTesting
cts.Cancel();
var ex = Assert.Throws<RpcException>(async () => await call.ResponseStream.MoveNext());
var ex = Assert.ThrowsAsync<RpcException>(async () => await call.ResponseStream.MoveNext());
Assert.AreEqual(StatusCode.Cancelled, ex.Status.StatusCode);
}
Console.WriteLine("Passed!");
@ -493,7 +493,7 @@ namespace Grpc.IntegrationTesting
// Deadline was reached before write has started. Eat the exception and continue.
}
var ex = Assert.Throws<RpcException>(async () => await call.ResponseStream.MoveNext());
var ex = Assert.ThrowsAsync<RpcException>(async () => await call.ResponseStream.MoveNext());
Assert.AreEqual(StatusCode.DeadlineExceeded, ex.Status.StatusCode);
}
Console.WriteLine("Passed!");
@ -572,7 +572,7 @@ namespace Grpc.IntegrationTesting
await call.RequestStream.WriteAsync(request);
await call.RequestStream.CompleteAsync();
var e = Assert.Throws<RpcException>(async () => await call.ResponseStream.ToListAsync());
var e = Assert.ThrowsAsync<RpcException>(async () => await call.ResponseStream.ToListAsync());
Assert.AreEqual(StatusCode.Unknown, e.Status.StatusCode);
Assert.AreEqual(echoStatus.Message, e.Status.Detail);
}

@ -0,0 +1,59 @@
#region Copyright notice and license
// Copyright 2016, 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.
#endregion
using System;
using System.Reflection;
using Grpc.Core;
using Grpc.Core.Logging;
using NUnit.Common;
using NUnitLite;
namespace Grpc.IntegrationTesting
{
/// <summary>
/// Provides entry point for NUnitLite
/// </summary>
public class NUnitMain
{
public static int Main(string[] args)
{
// Make logger immune to NUnit capturing stdout and stderr to workaround https://github.com/nunit/nunit/issues/1406.
GrpcEnvironment.SetLogger(new TextWriterLogger(Console.Error));
#if DOTNET5_4
return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In);
#else
return new AutoRun().Execute(args);
#endif
}
}
}

@ -35,6 +35,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Grpc.Core;
@ -50,9 +51,29 @@ namespace Grpc.IntegrationTesting
{
public const string DefaultHostOverride = "foo.test.google.fr";
public const string ClientCertAuthorityPath = "data/ca.pem";
public const string ServerCertChainPath = "data/server1.pem";
public const string ServerPrivateKeyPath = "data/server1.key";
public static string ClientCertAuthorityPath
{
get
{
return GetPath("data/ca.pem");
}
}
public static string ServerCertChainPath
{
get
{
return GetPath("data/server1.pem");
}
}
public static string ServerPrivateKeyPath
{
get
{
return GetPath("data/server1.key");
}
}
public static SslCredentials CreateSslCredentials()
{
@ -66,5 +87,11 @@ namespace Grpc.IntegrationTesting
File.ReadAllText(ServerPrivateKeyPath));
return new SslServerCredentials(new[] { keyCertPair });
}
private static string GetPath(string relativePath)
{
var assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
return Path.Combine(assemblyDir, relativePath);
}
}
}

@ -1,204 +0,0 @@
#region Copyright notice and license
// 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.
#endregion
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Grpc.Core;
namespace grpc.testing
{
/// <summary>
/// TestService (this is handwritten version of code that will normally be generated).
/// </summary>
public class TestServiceGrpc
{
static readonly string ServiceName = "/grpc.testing.TestService";
static readonly Marshaller<Empty> EmptyMarshaller = Marshallers.Create((arg) => arg.ToByteArray(), Empty.ParseFrom);
static readonly Marshaller<SimpleRequest> SimpleRequestMarshaller = Marshallers.Create((arg) => arg.ToByteArray(), SimpleRequest.ParseFrom);
static readonly Marshaller<SimpleResponse> SimpleResponseMarshaller = Marshallers.Create((arg) => arg.ToByteArray(), SimpleResponse.ParseFrom);
static readonly Marshaller<StreamingOutputCallRequest> StreamingOutputCallRequestMarshaller = Marshallers.Create((arg) => arg.ToByteArray(), StreamingOutputCallRequest.ParseFrom);
static readonly Marshaller<StreamingOutputCallResponse> StreamingOutputCallResponseMarshaller = Marshallers.Create((arg) => arg.ToByteArray(), StreamingOutputCallResponse.ParseFrom);
static readonly Marshaller<StreamingInputCallRequest> StreamingInputCallRequestMarshaller = Marshallers.Create((arg) => arg.ToByteArray(), StreamingInputCallRequest.ParseFrom);
static readonly Marshaller<StreamingInputCallResponse> StreamingInputCallResponseMarshaller = Marshallers.Create((arg) => arg.ToByteArray(), StreamingInputCallResponse.ParseFrom);
static readonly Method<Empty, Empty> EmptyCallMethod = new Method<Empty, Empty>(
MethodType.Unary,
"EmptyCall",
EmptyMarshaller,
EmptyMarshaller);
static readonly Method<SimpleRequest, SimpleResponse> UnaryCallMethod = new Method<SimpleRequest, SimpleResponse>(
MethodType.Unary,
"UnaryCall",
SimpleRequestMarshaller,
SimpleResponseMarshaller);
static readonly Method<StreamingOutputCallRequest, StreamingOutputCallResponse> StreamingOutputCallMethod = new Method<StreamingOutputCallRequest, StreamingOutputCallResponse>(
MethodType.ServerStreaming,
"StreamingOutputCall",
StreamingOutputCallRequestMarshaller,
StreamingOutputCallResponseMarshaller);
static readonly Method<StreamingInputCallRequest, StreamingInputCallResponse> StreamingInputCallMethod = new Method<StreamingInputCallRequest, StreamingInputCallResponse>(
MethodType.ClientStreaming,
"StreamingInputCall",
StreamingInputCallRequestMarshaller,
StreamingInputCallResponseMarshaller);
static readonly Method<StreamingOutputCallRequest, StreamingOutputCallResponse> FullDuplexCallMethod = new Method<StreamingOutputCallRequest, StreamingOutputCallResponse>(
MethodType.DuplexStreaming,
"FullDuplexCall",
StreamingOutputCallRequestMarshaller,
StreamingOutputCallResponseMarshaller);
static readonly Method<StreamingOutputCallRequest, StreamingOutputCallResponse> HalfDuplexCallMethod = new Method<StreamingOutputCallRequest, StreamingOutputCallResponse>(
MethodType.DuplexStreaming,
"HalfDuplexCall",
StreamingOutputCallRequestMarshaller,
StreamingOutputCallResponseMarshaller);
public interface ITestServiceClient
{
Empty EmptyCall(Empty request, CancellationToken token = default(CancellationToken));
Task<Empty> EmptyCallAsync(Empty request, CancellationToken token = default(CancellationToken));
SimpleResponse UnaryCall(SimpleRequest request, CancellationToken token = default(CancellationToken));
Task<SimpleResponse> UnaryCallAsync(SimpleRequest request, CancellationToken token = default(CancellationToken));
AsyncServerStreamingCall<StreamingOutputCallResponse> StreamingOutputCall(StreamingOutputCallRequest request, CancellationToken token = default(CancellationToken));
AsyncClientStreamingCall<StreamingInputCallRequest, StreamingInputCallResponse> StreamingInputCall(CancellationToken token = default(CancellationToken));
AsyncDuplexStreamingCall<StreamingOutputCallRequest, StreamingOutputCallResponse> FullDuplexCall(CancellationToken token = default(CancellationToken));
AsyncDuplexStreamingCall<StreamingOutputCallRequest, StreamingOutputCallResponse> HalfDuplexCall(CancellationToken token = default(CancellationToken));
}
public class TestServiceClientStub : AbstractStub<TestServiceClientStub, StubConfiguration>, ITestServiceClient
{
public TestServiceClientStub(Channel channel) : base(channel, StubConfiguration.Default)
{
}
public TestServiceClientStub(Channel channel, StubConfiguration config) : base(channel, config)
{
}
public Empty EmptyCall(Empty request, CancellationToken token = default(CancellationToken))
{
var call = CreateCall(ServiceName, EmptyCallMethod);
return Calls.BlockingUnaryCall(call, request, token);
}
public Task<Empty> EmptyCallAsync(Empty request, CancellationToken token = default(CancellationToken))
{
var call = CreateCall(ServiceName, EmptyCallMethod);
return Calls.AsyncUnaryCall(call, request, token);
}
public SimpleResponse UnaryCall(SimpleRequest request, CancellationToken token = default(CancellationToken))
{
var call = CreateCall(ServiceName, UnaryCallMethod);
return Calls.BlockingUnaryCall(call, request, token);
}
public Task<SimpleResponse> UnaryCallAsync(SimpleRequest request, CancellationToken token = default(CancellationToken))
{
var call = CreateCall(ServiceName, UnaryCallMethod);
return Calls.AsyncUnaryCall(call, request, token);
}
public AsyncServerStreamingCall<StreamingOutputCallResponse> StreamingOutputCall(StreamingOutputCallRequest request, CancellationToken token = default(CancellationToken))
{
var call = CreateCall(ServiceName, StreamingOutputCallMethod);
return Calls.AsyncServerStreamingCall(call, request, token);
}
public AsyncClientStreamingCall<StreamingInputCallRequest, StreamingInputCallResponse> StreamingInputCall(CancellationToken token = default(CancellationToken))
{
var call = CreateCall(ServiceName, StreamingInputCallMethod);
return Calls.AsyncClientStreamingCall(call, token);
}
public AsyncDuplexStreamingCall<StreamingOutputCallRequest, StreamingOutputCallResponse> FullDuplexCall(CancellationToken token = default(CancellationToken))
{
var call = CreateCall(ServiceName, FullDuplexCallMethod);
return Calls.AsyncDuplexStreamingCall(call, token);
}
public AsyncDuplexStreamingCall<StreamingOutputCallRequest, StreamingOutputCallResponse> HalfDuplexCall(CancellationToken token = default(CancellationToken))
{
var call = CreateCall(ServiceName, HalfDuplexCallMethod);
return Calls.AsyncDuplexStreamingCall(call, token);
}
}
// server-side interface
public interface ITestService
{
Task<Empty> EmptyCall(ServerCallContext context, Empty request);
Task<SimpleResponse> UnaryCall(ServerCallContext context, SimpleRequest request);
Task StreamingOutputCall(ServerCallContext context, StreamingOutputCallRequest request, IServerStreamWriter<StreamingOutputCallResponse> responseStream);
Task<StreamingInputCallResponse> StreamingInputCall(ServerCallContext context, IAsyncStreamReader<StreamingInputCallRequest> requestStream);
Task FullDuplexCall(ServerCallContext context, IAsyncStreamReader<StreamingOutputCallRequest> requestStream, IServerStreamWriter<StreamingOutputCallResponse> responseStream);
Task HalfDuplexCall(ServerCallContext context, IAsyncStreamReader<StreamingOutputCallRequest> requestStream, IServerStreamWriter<StreamingOutputCallResponse> responseStream);
}
public static ServerServiceDefinition BindService(ITestService serviceImpl)
{
return ServerServiceDefinition.CreateBuilder(ServiceName)
.AddMethod(EmptyCallMethod, serviceImpl.EmptyCall)
.AddMethod(UnaryCallMethod, serviceImpl.UnaryCall)
.AddMethod(StreamingOutputCallMethod, serviceImpl.StreamingOutputCall)
.AddMethod(StreamingInputCallMethod, serviceImpl.StreamingInputCall)
.AddMethod(FullDuplexCallMethod, serviceImpl.FullDuplexCall)
.AddMethod(HalfDuplexCallMethod, serviceImpl.HalfDuplexCall)
.Build();
}
public static ITestServiceClient NewStub(Channel channel)
{
return new TestServiceClientStub(channel);
}
}
}

@ -8,5 +8,6 @@
<package id="Ix-Async" version="1.2.5" targetFramework="net45" />
<package id="Moq" version="4.2.1510.2205" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="NUnit" version="2.6.4" targetFramework="net45" />
<package id="NUnit" version="3.2.0" targetFramework="net45" />
<package id="NUnitLite" version="3.2.0" targetFramework="net45" />
</packages>

@ -12,12 +12,12 @@ set NUGET=C:\nuget\nuget.exe
@rem Collect the artifacts built by the previous build step if running on Jenkins
@rem TODO(jtattermusch): is there a better way to do this?
xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=windows\artifacts\* grpc.native.csharp\windows_x86\
xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=windows\artifacts\* grpc.native.csharp\windows_x64\
xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=linux\artifacts\* grpc.native.csharp\linux_x86\
xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=linux\artifacts\* grpc.native.csharp\linux_x64\
xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=macos\artifacts\* grpc.native.csharp\macosx_x86\
xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=macos\artifacts\* grpc.native.csharp\macosx_x64\
xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=windows\artifacts\* Grpc.Core\windows_x86\
xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=windows\artifacts\* Grpc.Core\windows_x64\
xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=linux\artifacts\* Grpc.Core\linux_x86\
xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=linux\artifacts\* Grpc.Core\linux_x64\
xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=macos\artifacts\* Grpc.Core\macosx_x86\
xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=macos\artifacts\* Grpc.Core\macosx_x64\
@rem Collect protoc artifacts built by the previous build step
xcopy /Y /I ..\..\architecture=x86,language=protoc,platform=windows\artifacts\* protoc_plugins\windows_x86\
@ -42,7 +42,6 @@ msbuild Grpc.sln /p:Configuration=ReleaseSigned || goto :error
endlocal
%NUGET% pack grpc.native.csharp\grpc.native.csharp.nuspec -Version %VERSION% || goto :error
%NUGET% pack Grpc.Auth\Grpc.Auth.nuspec -Symbols -Version %VERSION% || goto :error
%NUGET% pack Grpc.Core\Grpc.Core.nuspec -Symbols -Version %VERSION% || goto :error
%NUGET% pack Grpc.HealthCheck\Grpc.HealthCheck.nuspec -Symbols -Version %VERSION_WITH_BETA% -Properties ProtobufVersion=%PROTOBUF_VERSION% || goto :error

@ -1,22 +0,0 @@
gRPC Native Nuget package
=========================
Prerequisites
-------------
NuGet binary
Building the package
--------------------
To build the native package, you need precompiled versions
of grpc_csharp_ext library artifacts for Windows, Linux and Mac.
In the normal gRPC release process, these are built by a Jenkins
job and they are copied to the expected location before building
the native nuget package is attempted.
See tools/run_tests/build_artifacts.py for more details how
precompiled artifacts are built.
When building the native NuGet package, ignore the "Assembly outside lib folder"
warnings (the DLLs are not assemblies, they are native libraries).

@ -1,11 +1,5 @@
{
"assemblies": [
"Grpc.Core.Tests",
"Grpc.Examples.Tests",
"Grpc.HealthCheck.Tests",
"Grpc.IntegrationTesting"
],
"tests": [
"Grpc.Core.Tests": [
"Grpc.Core.Internal.Tests.AsyncCallTest",
"Grpc.Core.Internal.Tests.ChannelArgsSafeHandleTest",
"Grpc.Core.Internal.Tests.CompletionQueueEventTest",
@ -32,13 +26,19 @@
"Grpc.Core.Tests.ServerTest",
"Grpc.Core.Tests.ShutdownTest",
"Grpc.Core.Tests.TimeoutsTest",
"Grpc.Core.Tests.UserAgentStringTest",
"Math.Tests.MathClientServerTest",
"Grpc.Core.Tests.UserAgentStringTest"
],
"Grpc.Examples.Tests": [
"Math.Tests.MathClientServerTest"
],
"Grpc.HealthCheck.Tests": [
"Grpc.HealthCheck.Tests.HealthClientServerTest",
"Grpc.HealthCheck.Tests.HealthServiceImplTest",
"Grpc.IntegrationTesting.HistogramTest",
"Grpc.HealthCheck.Tests.HealthServiceImplTest"
],
"Grpc.IntegrationTesting": [
"Grpc.IntegrationTesting.GeneratedClientTest",
"Grpc.IntegrationTesting.GeneratedServiceBaseTest",
"Grpc.IntegrationTesting.HistogramTest",
"Grpc.IntegrationTesting.InteropClientServerTest",
"Grpc.IntegrationTesting.MetadataCredentialsTest",
"Grpc.IntegrationTesting.RunnerClientServerTest",

@ -63,20 +63,14 @@
"src/node/health_check",
"src/proto",
"etc",
% for module in node_modules:
% for file in module.headers + module.src + module.js:
"${file}",
% endfor
% for dep in module.transitive_deps:
% for lib in libs:
% if lib.name == dep:
% for file in lib.get('public_headers', []) + lib.headers + lib.src:
"${file}",
% endfor
% endif
% endfor
% endfor
% endfor
"src/node/index.js",
"src/node/src",
"src/node/ext",
"include/grpc",
"src/core",
"third_party/nanopb",
"third_party/zlib",
"third_party/boringssl",
"binding.gyp"
],
"main": "src/node/index.js",

@ -14,12 +14,12 @@
@rem Collect the artifacts built by the previous build step if running on Jenkins
@rem TODO(jtattermusch): is there a better way to do this?
xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=windows\artifacts\* grpc.native.csharp\windows_x86${"\\"}
xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=windows\artifacts\* grpc.native.csharp\windows_x64${"\\"}
xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=linux\artifacts\* grpc.native.csharp\linux_x86${"\\"}
xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=linux\artifacts\* grpc.native.csharp\linux_x64${"\\"}
xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=macos\artifacts\* grpc.native.csharp\macosx_x86${"\\"}
xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=macos\artifacts\* grpc.native.csharp\macosx_x64${"\\"}
xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=windows\artifacts\* Grpc.Core\windows_x86${"\\"}
xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=windows\artifacts\* Grpc.Core\windows_x64${"\\"}
xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=linux\artifacts\* Grpc.Core\linux_x86${"\\"}
xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=linux\artifacts\* Grpc.Core\linux_x64${"\\"}
xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=macos\artifacts\* Grpc.Core\macosx_x86${"\\"}
xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=macos\artifacts\* Grpc.Core\macosx_x64${"\\"}
@rem Collect protoc artifacts built by the previous build step
xcopy /Y /I ..\..\architecture=x86,language=protoc,platform=windows\artifacts\* protoc_plugins\windows_x86${"\\"}
@ -44,7 +44,6 @@
endlocal
%%NUGET% pack grpc.native.csharp\grpc.native.csharp.nuspec -Version %VERSION% || goto :error
%%NUGET% pack Grpc.Auth\Grpc.Auth.nuspec -Symbols -Version %VERSION% || goto :error
%%NUGET% pack Grpc.Core\Grpc.Core.nuspec -Symbols -Version %VERSION% || goto :error
%%NUGET% pack Grpc.HealthCheck\Grpc.HealthCheck.nuspec -Symbols -Version %VERSION_WITH_BETA% -Properties ProtobufVersion=%PROTOBUF_VERSION% || goto :error

@ -35,7 +35,13 @@ template: |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
flags="-max_total_time=$runtime -jobs=3 -workers=3 -artifact_prefix=fuzzer_output/ -max_len=${selected.maxlen}"
flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=${selected.maxlen}"
if [ "$jobs" != "1" ]
then
flags="-jobs=$jobs -workers=$jobs"
fi
if [ "$config" == "asan-trace-cmp" ]
then
flags="-use_traces=1 $flags"

@ -0,0 +1,2 @@
::nix::ii///ii/\a‡?=n;iI_!';&b.cii??nn!%i!*%
*;

@ -0,0 +1 @@
uni:/i:i:‡i:i:‡i??ni=niIi??ni=niI__!!i?n!i'p'pR2p~~

@ -0,0 +1 @@
uni::.ilP:%:%i:i‡i:‡i?=nii?n(!ipRI_&/.i;;!?=ii/?n#lniiI_!*Kii!/?ni*

@ -0,0 +1 @@
ilP:%:%i:i‡i:‡i?=niI_.i;;!?=ii/?n#lniiI_!*Kii!/?ni*

@ -0,0 +1,154 @@
/*
*
* Copyright 2016, 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.
*
*/
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/surface/channel.h"
#include "test/core/util/mock_endpoint.h"
static const bool squelch = true;
static void discard_write(gpr_slice slice) {}
static void *tag(int n) { return (void *)(uintptr_t)n; }
static void dont_log(gpr_log_func_args *args) {}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
grpc_test_only_set_metadata_hash_seed(0);
if (squelch) gpr_set_log_function(dont_log);
grpc_init();
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_endpoint *mock_endpoint = grpc_mock_endpoint_create(discard_write);
grpc_completion_queue *cq = grpc_completion_queue_create(NULL);
grpc_transport *transport =
grpc_create_chttp2_transport(&exec_ctx, NULL, mock_endpoint, 1);
grpc_chttp2_transport_start_reading(&exec_ctx, transport, NULL, 0);
grpc_channel *channel = grpc_channel_create(
&exec_ctx, "test-target", NULL, GRPC_CLIENT_DIRECT_CHANNEL, transport);
grpc_call *call =
grpc_channel_create_call(channel, NULL, 0, cq, "/foo", "localhost",
gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array_init(&initial_metadata_recv);
grpc_byte_buffer *response_payload_recv = NULL;
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array_init(&trailing_metadata_recv);
grpc_status_code status;
char *details = NULL;
size_t details_capacity = 0;
grpc_op ops[6];
grpc_op *op = ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
op->data.send_initial_metadata.count = 0;
op->flags = 0;
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
op->flags = 0;
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_INITIAL_METADATA;
op->data.recv_initial_metadata = &initial_metadata_recv;
op->flags = 0;
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &response_payload_recv;
op->flags = 0;
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv;
op->data.recv_status_on_client.status = &status;
op->data.recv_status_on_client.status_details = &details;
op->data.recv_status_on_client.status_details_capacity = &details_capacity;
op->flags = 0;
op->reserved = NULL;
op++;
grpc_call_error error =
grpc_call_start_batch(call, ops, (size_t)(op - ops), tag(1), NULL);
int requested_calls = 1;
GPR_ASSERT(GRPC_CALL_OK == error);
grpc_mock_endpoint_put_read(
&exec_ctx, mock_endpoint,
gpr_slice_from_copied_buffer((const char *)data, size));
grpc_event ev;
while (1) {
grpc_exec_ctx_flush(&exec_ctx);
ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), NULL);
switch (ev.type) {
case GRPC_QUEUE_TIMEOUT:
goto done;
case GRPC_QUEUE_SHUTDOWN:
break;
case GRPC_OP_COMPLETE:
requested_calls--;
break;
}
}
done:
if (requested_calls) {
grpc_call_cancel(call, NULL);
}
for (int i = 0; i < requested_calls; i++) {
ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), NULL);
GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
}
grpc_completion_queue_shutdown(cq);
for (int i = 0; i < requested_calls; i++) {
ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), NULL);
GPR_ASSERT(ev.type == GRPC_QUEUE_SHUTDOWN);
}
grpc_call_destroy(call);
grpc_completion_queue_destroy(cq);
grpc_metadata_array_destroy(&initial_metadata_recv);
grpc_metadata_array_destroy(&trailing_metadata_recv);
gpr_free(details);
grpc_channel_destroy(channel);
if (response_payload_recv != NULL) {
grpc_byte_buffer_destroy(response_payload_recv);
}
grpc_shutdown();
return 0;
}

@ -0,0 +1 @@
!mm!N!mmN<EFBFBD><EFBFBD><EFBFBD>!<EFBFBD>m!<EFBFBD>NN'<EFBFBD>)<EFBFBD><EFBFBD><EFBFBD><EFBFBD>!<EFBFBD>m!<EFBFBD>NNN<EFBFBD>NNN'<EFBFBD>)<EFBFBD><EFBFBD>N<EFBFBD>NNN

@ -0,0 +1,2 @@
!mm!N!mmÿ!m)m!‘‘N!‘‘Nð‘NN)‘
‘a‘‘‘‘NNN•‘‘!‘m!)‘‘'NN‘‘•‘!‘Nm!N‘NNNN‘NNN'‘)‘‘N‘NNN

@ -0,0 +1 @@
!mm <EFBFBD><EFBFBD>N!<EFBFBD><EFBFBD>N<EFBFBD>N'<EFBFBD>)<EFBFBD><EFBFBD>NN

@ -0,0 +1,2 @@
!mm!N!mm!m)m!‘‘N!‘‘Nð‘NN)‘
‘a‘‘‘‘NNN•‘‘!‘m!)‘‘'NN‘‘•‘!‘Nm!N‘NNNN‘NNN'‘)‘‘N‘NNN

@ -0,0 +1,2 @@
!mm!N1mm!m)m!‘‘N!‘‘Nð‘NN)‘
‘a‘‘‘‘NNN•‘‘!‘m!‘‘‘N'N‘•‘!‘mNN!‘NNN‘NNN'Ñ)‘‘N‘NNN

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save