From a7361c79b66d587202a37b6c3a7becee8fefcabc Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 28 May 2015 09:42:52 -0700 Subject: update nuspec files --- src/csharp/Grpc.Auth/Grpc.Auth.nuspec | 2 +- src/csharp/Grpc.Core/Grpc.Core.nuspec | 2 +- src/csharp/Grpc.nuspec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src') 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 @@ Auth library for C# implementation of gRPC - an RPC library and framework. See project site for more info. 0.5.0 Google Inc. - jtattermusch + grpc-packages https://github.com/grpc/grpc/blob/master/LICENSE https://github.com/grpc/grpc false 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 @@ Core C# implementation of gRPC - an RPC library and framework. See project site for more info. 0.5.0 Google Inc. - jtattermusch + grpc-packages https://github.com/grpc/grpc/blob/master/LICENSE https://github.com/grpc/grpc false 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 @@ C# implementation of gRPC - an RPC library and framework. See project site for more info. 0.5.0 Google Inc. - jtattermusch + grpc-packages https://github.com/grpc/grpc/blob/master/LICENSE https://github.com/grpc/grpc false @@ -18,5 +18,8 @@ - + + + + -- cgit v1.2.3 From dd7a036f75c63f9a266c9e8ee4e79942505a9892 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Thu, 28 May 2015 14:06:41 -0700 Subject: Add's logging tweaks thread interaction for bidi_server --- src/ruby/bin/interop/interop_server.rb | 7 +++++-- src/ruby/lib/grpc/generic/active_call.rb | 1 + src/ruby/lib/grpc/generic/bidi_call.rb | 28 ++++++++++++++++------------ src/ruby/lib/grpc/generic/rpc_desc.rb | 1 + 4 files changed, 23 insertions(+), 14 deletions(-) (limited to 'src') 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}") -- cgit v1.2.3 From e0281bbbf10f1c652bb613870465f9ca284ccc4c Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 28 May 2015 15:33:48 -0700 Subject: Set verbosity to 2 for Python tests Fixes #1762. --- src/python/interop/interop/_insecure_interop_test.py | 2 +- src/python/interop/interop/_secure_interop_test.py | 2 +- .../src/grpc/_adapter/_blocking_invocation_inline_service_test.py | 2 +- src/python/src/grpc/_adapter/_c_test.py | 2 +- .../grpc/_adapter/_event_invocation_synchronous_event_service_test.py | 2 +- .../grpc/_adapter/_future_invocation_asynchronous_event_service_test.py | 2 +- src/python/src/grpc/_adapter/_links_test.py | 2 +- src/python/src/grpc/_adapter/_lonely_rear_link_test.py | 2 +- src/python/src/grpc/_adapter/_low_test.py | 2 +- src/python/src/grpc/early_adopter/implementations_test.py | 2 +- src/python/src/grpc/framework/base/implementations_test.py | 2 +- .../src/grpc/framework/face/blocking_invocation_inline_service_test.py | 2 +- .../framework/face/event_invocation_synchronous_event_service_test.py | 2 +- .../framework/face/future_invocation_asynchronous_event_service_test.py | 2 +- src/python/src/grpc/framework/foundation/_later_test.py | 2 +- src/python/src/grpc/framework/foundation/_logging_pool_test.py | 2 +- test/compiler/python_plugin_test.py | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src') 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/_c_test.py b/src/python/src/grpc/_adapter/_c_test.py index 6e15adbda8..b06215f0e5 100644 --- a/src/python/src/grpc/_adapter/_c_test.py +++ b/src/python/src/grpc/_adapter/_c_test.py @@ -216,4 +216,4 @@ class _CTest(unittest.TestCase): 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 09c4660a2b..d4b628c2ae 100644 --- a/src/python/src/grpc/_adapter/_low_test.py +++ b/src/python/src/grpc/_adapter/_low_test.py @@ -412,4 +412,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/test/compiler/python_plugin_test.py b/test/compiler/python_plugin_test.py index ad3bebac30..367effdb1a 100644 --- a/test/compiler/python_plugin_test.py +++ b/test/compiler/python_plugin_test.py @@ -520,4 +520,4 @@ class PythonPluginTest(unittest.TestCase): if __name__ == '__main__': os.chdir(os.path.dirname(sys.argv[0])) - unittest.main() + unittest.main(verbosity=2) -- cgit v1.2.3