Commit Graph

70 Commits

Author SHA1 Message Date
Xudong Ma 47ad6f81bf Fix the double-closure of server call for interop tests. 2015-09-15 16:40:59 -07:00
Kun Zhang ff3dbf7b0a Deprecate OkHttpChannelBuilder#overrideHostForAuthority
It is a duplication of overrideAuthority().
2015-09-11 16:22:36 -07:00
Carl Mastrangelo 49bb24c25f Make Interop Server block until shutdown 2015-09-11 16:01:34 -07:00
Eric Anderson a6621daca2 Private ServerMethodDefinition constructor; avoid create() in codegen
There is no need to use ServerMethodDefinition in codegen. The create()
method itself could be helpful to a dynamic HandlerRegistry
implementation, so we won't remove it.
2015-09-11 09:25:24 -07:00
nmittler a0f0790cc7 Make tcnative available to the interop scripts. 2015-09-10 16:13:32 -07:00
Eric Anderson be0d7e911a Prevent construction of container classes and reduce API 2015-09-10 10:09:13 -07:00
Eric Anderson 23e6318156 Reduce API surface of AbstractStub 2015-09-10 08:36:08 -07:00
nmittler 9466eb5014 Adding tc_native to interop test scripts
Also adding better server error log
2015-09-09 07:16:49 -07:00
Xudong Ma bdaf7b3236 okhttp: Skip trash data for finished stream. 2015-09-03 23:44:43 -07:00
Eric Anderson 47a7ccf0cb Avoid Parser for normal protobuf
Eventually, this could avoid allocating Parser, since we can use
newBuilderForType().mergeFrom(). This would primarily benefit Lite
proto.
2015-09-03 17:31:16 -07:00
Eric Anderson 0336a701eb Revert "Merge pull request #940 from nmittler/interop_openssl"
This reverts commit 2aecb6f02b, reversing
changes made to 5d34599390.

The change broke OkHttp's tests
2015-09-03 16:32:01 -07:00
nmittler 79aec3b3c5 Enabling openssl in interop-testing scripts 2015-09-03 13:48:21 -07:00
nmittler b687bdc742 Refactoring channel API.
Client:
* New ManagedChannel abstract class.
* Adding ping to Channel.
* Moving builders and implementations to internal.

Server:
* Added lifecycle management API to Server (mirroring ManagedChannel).
* Moved ServerImpl, AbstractServerBuilder and handler registries to internal.
* New ServerBuilder abstract class (mirroring ManagedChannelBuilder).

Fixes #545
2015-09-03 11:22:29 -07:00
Eric Anderson c68f9ffce0 Implement jwt_token_creds interop test
Using a JWT is a bit more work than it should be, but improving that
will come later.

At present, this test fails, but it is believed to be due to the auth
library.
2015-09-03 10:38:18 -07:00
Xudong Ma d5bd33ca1b Fix generated code reference for intellij projects. 2015-09-02 14:18:31 -07:00
David P. Baker 66b984ca9d Extract the fully-qualified service name into a public static final field on the service container type. 2015-09-02 13:42:46 -07:00
Xudong Ma 0a51f0fbd9 Move StreamRecorder to testing package. 2015-09-01 09:15:03 -07:00
Kun Zhang 5bb0ea9899 Annotate method descritpor files in the generated code with ExperimentalApi 2015-08-31 09:56:44 -07:00
Kun Zhang bd23a8d693 Upgrade to protobuf-3.0.0-beta-1 2015-08-31 09:26:20 -07:00
Xudong Ma 0958fd407e Fix flakiness in test timeoutOnSleepingServer 2015-08-27 22:52:01 -07:00
Xudong Ma 1f0cad21e5 Implement per_rpc_creds test 2015-08-27 16:28:31 -07:00
Xiao Hang 3c79c52427 Implement timeout_on_sleeping_server test 2015-08-27 16:21:52 -07:00
Xiao Hang 7fc86e5549 Implement unimplemented_method test 2015-08-27 12:56:50 -07:00
Louis Ryan a4c821d94e Rename onValue to onNext in StreamObserver to align with the naming in Rx & the proposed Flow API in
Java9
2015-08-26 17:38:22 -07:00
Carl Mastrangelo a508c1d4f5 Remove Headers 2015-08-24 11:41:10 -07:00
nmittler e2f88fa904 Moving a few common utilities to GrpcUtil. 2015-08-24 07:53:32 -07:00
nmittler 9f7cb80108 Adding handling for stream exhaustion in Netty. 2015-08-21 13:01:17 -07:00
Kun Zhang 042b278256 Remove the first MethodDescriptor constructor.
that takes the service name and method name separately.

Also fix tests that are still using the old full qualified method name
format.
2015-08-20 14:19:50 -07:00
Xudong Ma b83742d61c Implement Connection Backoff Interop test. 2015-08-19 21:39:04 -07:00
Carl Mastrangelo 572f4332a7 Remove Trailers 2015-08-13 17:11:29 -07:00
Xudong Ma 12872dc9e2 Add test oauth2_auth_token. 2015-08-13 16:00:42 -07:00
Kun Zhang d2929cd1a3 Reorganize packages.
Reserve io.grpc for public API only, and all internal stuff in core to
io.grpc.internal, including the non-stable transport API.

Raise the netty/okhttp/inprocess subpackages one level up to io.grpc,
because they are public API and entry points for most users.

Details:

- Rename io.grpc.transport to io.grpc.internal;
- Move SharedResourceHolder and SerializingExecutor to io.grpc.internal
- Rename io.grpc.transport.{netty|okhttp|inprocess} to
  io.grpc.{netty|okhttp|inprocess}
2015-08-10 15:04:29 -07:00
Carl Mastrangelo aebb58b200 Change awaitTerminated to awaitTermination 2015-08-06 13:52:17 -07:00
Carl Mastrangelo 67fc45d036 Rename Duplex to Bidi 2015-08-05 17:05:47 -07:00
Xudong Ma d1e15ab859 Fix serviceAccountCreds test and computeEngineCreds test.
See #702 for details.
2015-08-04 18:11:59 -07:00
Carl Mastrangelo 89db769d2d Rename sendPayload to sendMessage 2015-07-31 15:28:06 -07:00
Carl Mastrangelo c86b547dd3 Forcibly cast in interop test 2015-07-31 15:22:09 -07:00
Carl Mastrangelo 14e774130d Rename onPayload to onMessage 2015-07-31 15:11:18 -07:00
nmittler a36f4af138 Fix flaky test 2015-07-28 16:35:52 -07:00
Jack Coughlin 1ac64bd09d Remove ServerDelayInterceptor from AbstractTransportTest 2015-07-27 07:25:41 -07:00
Kun Zhang 60cf5eb5da Use mutation methods for stub reconfiguration.
This makes the reconfiguration code more concise.

- Remove configureNewStub().
- Add mutation methods withDeadlineNanoTime(), withChannel() etc that
  returns the reconfigured stub.
2015-07-23 11:17:35 -07:00
Eric Anderson d11e9be127 Add in-process transport
Resolves #518
2015-07-22 15:54:37 -07:00
Kun Zhang eb92967a7e Get rid of AbstractServiceDescriptor as it is no longer useful 2015-07-17 17:03:36 -07:00
Kun Zhang 686dcff217 Rename unaryFutureCall to futureUnaryCall 2015-07-16 12:34:37 -07:00
Kun Zhang 690b26eb93 Sanitize ClientCalls.
- Remove blockingClientStreamingCall() which is not used, and we don't
  actually want that API.
- Rename duplexStreamingCall() to asyncDuplexStreamingCall() to align
  with other async methods.
- In unary call and client streaming call, do not request for additional
  response after the first response.
2015-07-15 17:35:36 -07:00
Kun Zhang 79f3f026f2 Migrate from PARSER to parser() as a way of getting the parser of a protobuf message.
This was done by #587 (commit af9fb6de77)
but was accidentally reverted by commit 73acc73dbf.
2015-07-15 16:55:26 -07:00
Jack Coughlin 3e26b993ce Enforce request deadline
Use a ScheduledExecutorService in the ChannelImpl to terminate the
request by closing the ClientStream with status DEADLINE_EXCEEDED
2015-07-14 16:47:45 -07:00
Eric Anderson ac9db3b157 Reduce flow control window for interop tests
Many of the interop tests were designed with the default 64 KB flow
control window in mind. If we test with 1 MB then it defeats the flow
control testing.

65 KB is an arbitrary number, but I chose it to be rather small, but
still not the HTTP/2-default 64 KB because implementations have had
trouble with applying flow control changes correctly.
2015-07-14 14:42:55 -07:00
Kun Zhang 867c76d185 Separate ServerCall binding utilities per method type.
This gives us more flexibility in API changes in the future.

Unary call and server streaming call should call the flow-control method
call.request() only once. Previously it was called whenever a request
arrives, which is wrong. Now it's fixed.

Resolves #436
2015-07-14 13:36:16 -07:00
Kun Zhang c73b75e477 Change AbstractServiceDescriptor.methods() to Collection. Resolves #573 2015-07-09 14:24:51 -07:00