diff options
author | Craig Tiller <ctiller@google.com> | 2015-05-29 12:39:08 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-05-29 12:39:08 -0700 |
commit | 43de01a25c87f333213d341ca128e58cb33e1b7d (patch) | |
tree | a31d214a8a994914268041dc52c2a8780ba48515 /src | |
parent | f54f2d0586382b17df8da24e00832cdee1d84103 (diff) | |
parent | bb517cabb7eea3295a084a2147bc7ac5622f0e8a (diff) |
Merge github.com:grpc/grpc into we-dont-need-no-backup
Diffstat (limited to 'src')
22 files changed, 45 insertions, 33 deletions
diff --git a/src/csharp/Grpc.Auth/Grpc.Auth.nuspec b/src/csharp/Grpc.Auth/Grpc.Auth.nuspec index 85aee35566..171259d18d 100644 --- a/src/csharp/Grpc.Auth/Grpc.Auth.nuspec +++ b/src/csharp/Grpc.Auth/Grpc.Auth.nuspec @@ -7,7 +7,7 @@ <description>Auth library for C# implementation of gRPC - an RPC library and framework. See project site for more info.</description> <version>0.5.0</version> <authors>Google Inc.</authors> - <owners>jtattermusch</owners> + <owners>grpc-packages</owners> <licenseUrl>https://github.com/grpc/grpc/blob/master/LICENSE</licenseUrl> <projectUrl>https://github.com/grpc/grpc</projectUrl> <requireLicenseAcceptance>false</requireLicenseAcceptance> diff --git a/src/csharp/Grpc.Core/Grpc.Core.nuspec b/src/csharp/Grpc.Core/Grpc.Core.nuspec index 69e8497bb7..42eb90c9a3 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.nuspec +++ b/src/csharp/Grpc.Core/Grpc.Core.nuspec @@ -7,7 +7,7 @@ <description>Core C# implementation of gRPC - an RPC library and framework. See project site for more info.</description> <version>0.5.0</version> <authors>Google Inc.</authors> - <owners>jtattermusch</owners> + <owners>grpc-packages</owners> <licenseUrl>https://github.com/grpc/grpc/blob/master/LICENSE</licenseUrl> <projectUrl>https://github.com/grpc/grpc</projectUrl> <requireLicenseAcceptance>false</requireLicenseAcceptance> diff --git a/src/csharp/Grpc.nuspec b/src/csharp/Grpc.nuspec index e3195e1806..b9a76f2c1a 100644 --- a/src/csharp/Grpc.nuspec +++ b/src/csharp/Grpc.nuspec @@ -7,7 +7,7 @@ <description>C# implementation of gRPC - an RPC library and framework. See project site for more info.</description> <version>0.5.0</version> <authors>Google Inc.</authors> - <owners>jtattermusch</owners> + <owners>grpc-packages</owners> <licenseUrl>https://github.com/grpc/grpc/blob/master/LICENSE</licenseUrl> <projectUrl>https://github.com/grpc/grpc</projectUrl> <requireLicenseAcceptance>false</requireLicenseAcceptance> @@ -18,5 +18,8 @@ <dependency id="Grpc.Core" version="0.5.0" /> </dependencies> </metadata> - <files/> + <files> + <file src="protoc.exe" target="tools" /> + <file src="grpc_csharp_plugin.exe" target="tools" /> + </files> </package> diff --git a/src/python/interop/interop/_insecure_interop_test.py b/src/python/interop/interop/_insecure_interop_test.py index 42e7a4d5c4..98ea3a6648 100644 --- a/src/python/interop/interop/_insecure_interop_test.py +++ b/src/python/interop/interop/_insecure_interop_test.py @@ -54,4 +54,4 @@ class InsecureInteropTest( if __name__ == '__main__': - unittest.main() + unittest.main(verbosity=2) diff --git a/src/python/interop/interop/_secure_interop_test.py b/src/python/interop/interop/_secure_interop_test.py index 27e76315b6..be7618f549 100644 --- a/src/python/interop/interop/_secure_interop_test.py +++ b/src/python/interop/interop/_secure_interop_test.py @@ -61,4 +61,4 @@ class SecureInteropTest( if __name__ == '__main__': - unittest.main() + unittest.main(verbosity=2) diff --git a/src/python/src/grpc/_adapter/_blocking_invocation_inline_service_test.py b/src/python/src/grpc/_adapter/_blocking_invocation_inline_service_test.py index 3cd51928d3..7a8ff0ad89 100644 --- a/src/python/src/grpc/_adapter/_blocking_invocation_inline_service_test.py +++ b/src/python/src/grpc/_adapter/_blocking_invocation_inline_service_test.py @@ -43,4 +43,4 @@ class BlockingInvocationInlineServiceTest( if __name__ == '__main__': - unittest.main() + unittest.main(verbosity=2) diff --git a/src/python/src/grpc/_adapter/_event_invocation_synchronous_event_service_test.py b/src/python/src/grpc/_adapter/_event_invocation_synchronous_event_service_test.py index b9a13ce69f..b8ceb75d68 100644 --- a/src/python/src/grpc/_adapter/_event_invocation_synchronous_event_service_test.py +++ b/src/python/src/grpc/_adapter/_event_invocation_synchronous_event_service_test.py @@ -43,4 +43,4 @@ class EventInvocationSynchronousEventServiceTest( if __name__ == '__main__': - unittest.main() + unittest.main(verbosity=2) diff --git a/src/python/src/grpc/_adapter/_future_invocation_asynchronous_event_service_test.py b/src/python/src/grpc/_adapter/_future_invocation_asynchronous_event_service_test.py index 7d6a4ffc17..3773e65575 100644 --- a/src/python/src/grpc/_adapter/_future_invocation_asynchronous_event_service_test.py +++ b/src/python/src/grpc/_adapter/_future_invocation_asynchronous_event_service_test.py @@ -43,4 +43,4 @@ class FutureInvocationAsynchronousEventServiceTest( if __name__ == '__main__': - unittest.main() + unittest.main(verbosity=2) diff --git a/src/python/src/grpc/_adapter/_links_test.py b/src/python/src/grpc/_adapter/_links_test.py index 4fd76f60f8..50257d8691 100644 --- a/src/python/src/grpc/_adapter/_links_test.py +++ b/src/python/src/grpc/_adapter/_links_test.py @@ -274,4 +274,4 @@ class RoundTripTest(unittest.TestCase): if __name__ == '__main__': - unittest.main() + unittest.main(verbosity=2) diff --git a/src/python/src/grpc/_adapter/_lonely_rear_link_test.py b/src/python/src/grpc/_adapter/_lonely_rear_link_test.py index bdb1ee2379..7f5021f40e 100644 --- a/src/python/src/grpc/_adapter/_lonely_rear_link_test.py +++ b/src/python/src/grpc/_adapter/_lonely_rear_link_test.py @@ -97,4 +97,4 @@ class LonelyRearLinkTest(unittest.TestCase): if __name__ == '__main__': - unittest.main() + unittest.main(verbosity=2) diff --git a/src/python/src/grpc/_adapter/_low_test.py b/src/python/src/grpc/_adapter/_low_test.py index edae2dff61..22006c36b8 100644 --- a/src/python/src/grpc/_adapter/_low_test.py +++ b/src/python/src/grpc/_adapter/_low_test.py @@ -399,4 +399,4 @@ class ExpirationTest(unittest.TestCase): if __name__ == '__main__': - unittest.main() + unittest.main(verbosity=2) diff --git a/src/python/src/grpc/early_adopter/implementations_test.py b/src/python/src/grpc/early_adopter/implementations_test.py index 32b974724c..49f0e949c4 100644 --- a/src/python/src/grpc/early_adopter/implementations_test.py +++ b/src/python/src/grpc/early_adopter/implementations_test.py @@ -177,4 +177,4 @@ class EarlyAdopterImplementationsTest(unittest.TestCase): if __name__ == '__main__': - unittest.main() + unittest.main(verbosity=2) diff --git a/src/python/src/grpc/framework/base/implementations_test.py b/src/python/src/grpc/framework/base/implementations_test.py index d40bb4d92e..72087f4456 100644 --- a/src/python/src/grpc/framework/base/implementations_test.py +++ b/src/python/src/grpc/framework/base/implementations_test.py @@ -77,4 +77,4 @@ class ImplementationsTest( if __name__ == '__main__': - unittest.main() + unittest.main(verbosity=2) diff --git a/src/python/src/grpc/framework/face/blocking_invocation_inline_service_test.py b/src/python/src/grpc/framework/face/blocking_invocation_inline_service_test.py index 636cd701ff..763f0f0edc 100644 --- a/src/python/src/grpc/framework/face/blocking_invocation_inline_service_test.py +++ b/src/python/src/grpc/framework/face/blocking_invocation_inline_service_test.py @@ -43,4 +43,4 @@ class BlockingInvocationInlineServiceTest( if __name__ == '__main__': - unittest.main() + unittest.main(verbosity=2) diff --git a/src/python/src/grpc/framework/face/event_invocation_synchronous_event_service_test.py b/src/python/src/grpc/framework/face/event_invocation_synchronous_event_service_test.py index 25f3e297b5..e1ab3cf711 100644 --- a/src/python/src/grpc/framework/face/event_invocation_synchronous_event_service_test.py +++ b/src/python/src/grpc/framework/face/event_invocation_synchronous_event_service_test.py @@ -43,4 +43,4 @@ class EventInvocationSynchronousEventServiceTest( if __name__ == '__main__': - unittest.main() + unittest.main(verbosity=2) diff --git a/src/python/src/grpc/framework/face/future_invocation_asynchronous_event_service_test.py b/src/python/src/grpc/framework/face/future_invocation_asynchronous_event_service_test.py index 38229ea9f4..2d13bb911d 100644 --- a/src/python/src/grpc/framework/face/future_invocation_asynchronous_event_service_test.py +++ b/src/python/src/grpc/framework/face/future_invocation_asynchronous_event_service_test.py @@ -43,4 +43,4 @@ class FutureInvocationAsynchronousEventServiceTest( if __name__ == '__main__': - unittest.main() + unittest.main(verbosity=2) diff --git a/src/python/src/grpc/framework/foundation/_later_test.py b/src/python/src/grpc/framework/foundation/_later_test.py index e83e703128..6c2459e185 100644 --- a/src/python/src/grpc/framework/foundation/_later_test.py +++ b/src/python/src/grpc/framework/foundation/_later_test.py @@ -148,4 +148,4 @@ class LaterTest(unittest.TestCase): self.assertEqual(return_value, future_passed_to_callback_cell[0].result()) if __name__ == '__main__': - unittest.main() + unittest.main(verbosity=2) diff --git a/src/python/src/grpc/framework/foundation/_logging_pool_test.py b/src/python/src/grpc/framework/foundation/_logging_pool_test.py index c92cf8c0ab..452802da6a 100644 --- a/src/python/src/grpc/framework/foundation/_logging_pool_test.py +++ b/src/python/src/grpc/framework/foundation/_logging_pool_test.py @@ -61,4 +61,4 @@ class LoggingPoolTest(unittest.TestCase): if __name__ == '__main__': - unittest.main() + unittest.main(verbosity=2) diff --git a/src/ruby/bin/interop/interop_server.rb b/src/ruby/bin/interop/interop_server.rb index 78cb8dd836..2ba8d2c19e 100755 --- a/src/ruby/bin/interop/interop_server.rb +++ b/src/ruby/bin/interop/interop_server.rb @@ -128,16 +128,19 @@ class TestTarget < Grpc::Testing::TestService::Service cls = StreamingOutputCallResponse Thread.new do begin + GRPC.logger.info('interop-server: started receiving') reqs.each do |req| - GRPC.logger.info("read #{req.inspect}") resp_size = req.response_parameters[0].size + GRPC.logger.info("read a req, response size is #{resp_size}") resp = cls.new(payload: Payload.new(type: req.response_type, body: nulls(resp_size))) q.push(resp) end - GRPC.logger.info('finished reads') + GRPC.logger.info('interop-server: finished receiving') q.push(self) rescue StandardError => e + GRPC.logger.info('interop-server: failed') + GRPC.logger.warn(e) q.push(e) # share the exception with the enumerator end end diff --git a/src/ruby/lib/grpc/generic/active_call.rb b/src/ruby/lib/grpc/generic/active_call.rb index 5f7beb5ab1..04abab8ac3 100644 --- a/src/ruby/lib/grpc/generic/active_call.rb +++ b/src/ruby/lib/grpc/generic/active_call.rb @@ -39,6 +39,7 @@ class Struct return nil if status.nil? fail GRPC::Cancelled if status.code == GRPC::Core::StatusCodes::CANCELLED if status.code != GRPC::Core::StatusCodes::OK + GRPC.logger.debug("Failing with status #{status}") # raise BadStatus, propagating the metadata if present. md = status.metadata with_sym_keys = Hash[md.each_pair.collect { |x, y| [x.to_sym, y] }] diff --git a/src/ruby/lib/grpc/generic/bidi_call.rb b/src/ruby/lib/grpc/generic/bidi_call.rb index 67143d40cf..f1b9f6b00d 100644 --- a/src/ruby/lib/grpc/generic/bidi_call.rb +++ b/src/ruby/lib/grpc/generic/bidi_call.rb @@ -100,6 +100,7 @@ module GRPC replys = gen_each_reply.call(each_queued_msg) @enq_th = start_write_loop(replys, is_client: false) @loop_th = start_read_loop + @enq_th.join if @enq_th.alive? end private @@ -115,7 +116,7 @@ module GRPC return enum_for(:each_queued_msg) unless block_given? count = 0 loop do - GRPC.logger.debug("each_queued_msg: msg##{count}") + GRPC.logger.debug("each_queued_msg: waiting##{count}") count += 1 req = @readq.pop GRPC.logger.debug("each_queued_msg: req = #{req}") @@ -123,70 +124,73 @@ module GRPC break if req.equal?(END_OF_READS) yield req end - @enq_th.join if @enq_th.alive? end # during bidi-streaming, read the requests to send from a separate thread # read so that read_loop does not block waiting for requests to read. def start_write_loop(requests, is_client: true) Thread.new do # TODO: run on a thread pool - write_tag = Object.new + GRPC.logger.debug('bidi-write-loop: starting') begin + write_tag = Object.new count = 0 requests.each do |req| - GRPC.logger.debug("bidi-write_loop: #{count}") + GRPC.logger.debug("bidi-write-loop: #{count}") count += 1 payload = @marshal.call(req) @call.run_batch(@cq, write_tag, INFINITE_FUTURE, SEND_MESSAGE => payload) end + GRPC.logger.debug("bidi-write-loop: #{count} writes done") if is_client - GRPC.logger.debug("bidi-write-loop: sent #{count}, waiting") + GRPC.logger.debug("bidi-write-loop: client sent #{count}, waiting") + @call.run_batch(@cq, write_tag, INFINITE_FUTURE, + SEND_CLOSE_FROM_CLIENT => nil) batch_result = @call.run_batch(@cq, write_tag, INFINITE_FUTURE, - SEND_CLOSE_FROM_CLIENT => nil, RECV_STATUS_ON_CLIENT => nil) batch_result.check_status end rescue StandardError => e - GRPC.logger.warn('bidi-write_loop: failed') + GRPC.logger.warn('bidi-write-loop: failed') GRPC.logger.warn(e) raise e end + GRPC.logger.debug('bidi-write-loop: finished') end end # starts the read loop def start_read_loop Thread.new do + GRPC.logger.debug('bidi-read-loop: starting') begin read_tag = Object.new count = 0 - # queue the initial read before beginning the loop loop do - GRPC.logger.debug("bidi-read_loop: #{count}") + GRPC.logger.debug("bidi-read-loop: #{count}") count += 1 # TODO: ensure metadata is read if available, currently it's not batch_result = @call.run_batch(@cq, read_tag, INFINITE_FUTURE, RECV_MESSAGE => nil) # handle the next message if batch_result.message.nil? + GRPC.logger.debug("bidi-read-loop: null batch #{batch_result}") @readq.push(END_OF_READS) GRPC.logger.debug('bidi-read-loop: done reading!') break end # push the latest read onto the queue and continue reading - GRPC.logger.debug("received req: #{batch_result.message}") res = @unmarshal.call(batch_result.message) @readq.push(res) end - rescue StandardError => e - GRPC.logger.warn('bidi: read_loop failed') + GRPC.logger.warn('bidi: read-loop failed') GRPC.logger.warn(e) @readq.push(e) # let each_queued_msg terminate with this error end + GRPC.logger.debug('bidi-read-loop: finished') end end end diff --git a/src/ruby/lib/grpc/generic/rpc_desc.rb b/src/ruby/lib/grpc/generic/rpc_desc.rb index 2fd61c5f7e..dd90d8d91d 100644 --- a/src/ruby/lib/grpc/generic/rpc_desc.rb +++ b/src/ruby/lib/grpc/generic/rpc_desc.rb @@ -137,6 +137,7 @@ module GRPC def send_status(active_client, code, details, **kw) details = 'Not sure why' if details.nil? + GRPC.logger.debug("Sending status #{code}:#{details}") active_client.send_status(code, details, code == OK, **kw) rescue StandardError => e GRPC.logger.warn("Could not send status #{code}:#{details}") |