Commit Graph

750 Commits

Author SHA1 Message Date
Eric Anderson fd52a765ed Blocking calls should error with StatusRuntimeException
Previously, it always threw a RuntimeExecutionException with a
StatusRuntimeException within (since the only callers of setException()
provide a StatusRuntimeException).

Resolves #507
2015-06-18 17:59:32 -07:00
Eric Anderson 4d5caf83fb Use exit() for integration test client
On my machine, the client currently takes ~3s to run a test. However,
with exit() it takes < 1s. When doing lots of integration tests, those
seconds add up.

We know one of those seconds is the DESTROY_DELAY_SECONDS of
SharedResourceHolder. Part of another second appears to be Netty
creating any threads that weren't previously created when shutting down.
2015-06-18 17:24:16 -07:00
Xudong Ma eb15eb2821 Some cleanup for okhttp:
1. Move DEFAULT_CONNECTION_SPEC to OkHttpChannelBuilder
2. make OkHttpClientTransport package-private
3. Rename OkHttpChannelBuilder.setConnectionSpec to connectionSpec
2015-06-18 13:29:18 -07:00
Eric Anderson 794fdf1615 Update Travis to use protobuf3-alpha3
It's only working today because alpha2 is still in the cache.
2015-06-17 16:12:11 -07:00
Jack Coughlin 77878a04ee Pass timeout header in ChannelImpl 2015-06-17 16:03:13 -07:00
nmittler 4322a43824 Throw error for Netty when Jetty ALPN not configured. 2015-06-17 14:19:55 -07:00
nmittler 9a6ded523a Cleanup of NettyClientTransportTest. 2015-06-16 13:11:03 -07:00
Eric Anderson 424c7e64c3 Avoid GCM in unit tests
GCM is very slow, and doesn't provide any benefit in unit tests. Even if
we were using tcnative and GCM is fast, using more available ciphers in
tests still makes sense. With this change building with Java 7 works
again, although that isn't the reason for the change.

On my machine with parallel building, it cuts full build time from
92 seconds to 39 seconds. For an incremental build after only changing
an interop test, the build time is cut from 73 seconds to 15 seconds.
2015-06-16 12:36:57 -07:00
nmittler cb486e461d Testing that buffered streams clean up properly upon disconnect. 2015-06-15 13:10:21 -07:00
David Connelly 15104cdc69 Make sure we enter terminated state when transport server has been shut down and all server transports have been closed. Previously, we had only been checking if server transports were closed. Also, make sure termination cleanup is performed at most once with an AssertionError if checkForTermination() called when server has already been terminated 2015-06-15 13:04:11 -07:00
nmittler d94fedc854 Updating master README.md to 0.7.1 release. 2015-06-12 07:32:50 -07:00
nmittler 491aad2659 Changing Netty handlers to properly set initialSettings. 2015-06-11 15:06:20 -07:00
Xudong Ma 25da64937d Support setting ALPN for Android older than 5.0, OkHttp(2.3+) implementation only support such function for Android 5.0+.
Manually tested with the test App: https://github.com/madongfly/grpc-android-test.

Fixes #520
2015-06-11 14:39:26 -07:00
Louis Ryan 58a142a68c Properly set inbound and outbound connection and stream window sizes 2015-06-10 17:53:57 -07:00
nmittler 483738e8bc Reorganizing the deployment docs. 2015-06-10 13:15:04 -07:00
Josh Humphries 0d03f89467 add ping 2015-06-10 12:20:08 -04:00
Kun Zhang b97d0ba903 Document how to copy credentials for docker 2015-06-08 10:06:29 -07:00
Kun Zhang a251171850 Upgrade to protobuf-3.0.0-alpha-3 2015-06-05 16:27:17 -07:00
Eric Anderson cd2bc1e9f0 Enable Travis for all branches
We are using branches for other flows of development, so we really want
it running everywhere.
2015-06-05 16:01:06 -07:00
Kun Zhang 2ee4d0228d Rename Call to ClientCalls.
Other classes are already following the convention that ClientFoo for
client-side, and ServerFoo for server-side. Call has been the black
sheep of the family.

- Call -> ClientCall
- Calls -> ClientCalls
- ForwardingCall* -> ForwardingClientCall*
2015-06-04 16:39:25 -07:00
nmittler 4ee2a6584a Allowing Netty TLS bootstrap handler to be sharable.
Fixes #504
2015-06-03 09:42:08 -07:00
Xudong Ma d242b225d0 Upgrade OkHttp to 2.4.
Fixes #490
2015-06-01 14:53:19 -07:00
Xudong Ma eed8f923af okhttp: Call onError for IOException thrown by FrameReader.nextFrame().
Since OkHttp wraps many protocol error as IOException, we need to send GoAway for such errors.

Fixes #487
2015-05-29 10:21:52 -07:00
Xudong Ma 0782c0408d Catch Exception thrown when query NPN selected protocol on a socket that haven't started hand shake. 2015-05-29 08:59:05 -07:00
Xudong Ma ac4952c45a Add service_account_creds test.
Fixes #456

Manually tested with ./run-test-client.sh --server_port=443 --server_host=grpc-test.sandbox.google.com --server_host_override=grpc-test.sandbox.google.com --service_account_key_file=/usr/local/google/home/simonma/gce_cred.json --oauth_scope=https://www.googleapis.com/auth/xapi.zoo --test_case=service_account_creds
2015-05-28 16:58:58 -07:00
Xudong Ma ffcc5f29c0 Remove unused imports.
to make CheckStyle happy.
2015-05-28 16:10:20 -07:00
Xudong Ma 926a2c168a Add compute_engine_creds test.
Fixes #455

Manually tesed by running on GCE (for both netty and okhttp):
./run-test-client.sh --server_port=443 --server_host=grpc-test.sandbox.google.com -
-server_host_override=grpc-test.sandbox.google.com --default_service_account=155450119199-r5aaqa2vqoa9g5mv2m6s3m1
l293rlmel@developer.gserviceaccount.com --oauth_scope=https://www.googleapis.com/auth/xapi.zoo --test_case=comput
e_engine_creds
2015-05-28 15:56:49 -07:00
nmittler 2483009fe3 Renaming AUTH_README.md to SECURITY.md
The doc discusses TLS as well as auth, so "AUTH" doesn't seem quite right.
2015-05-28 14:01:44 -07:00
nmittler 59f6f45cc4 Switching to Netty's ALPN support.
Also adding documentation for using gRPC with TLS-ALPN within Jetty.

Fixes #180
2015-05-28 13:04:10 -07:00
nmittler f770ffb18f Making test certs more shareable
To use the test certs a module has to depend on the grpc-interop-testing module, which doesn't really make sense.  I'm moving the certs to the grpc-testing module, which is meant to be a sort of testing common area for all of our modules.
2015-05-28 11:34:25 -07:00
Xudong Ma 2fe279f7c2 Add SelectedProtocolQuerier to get protocol selected by NPN on Android.
Fixes #467

Manually tested by using NPN on Android 4.3 (api level 18) talk to GFE.
2015-05-27 17:16:44 -07:00
Eric Anderson 1eb16d94fc Add download and usage instructions 2015-05-27 13:04:15 -07:00
Louis Ryan 641fc288fc Add support for indeterminate length messages. This will make using GRPC easier for non-proto payload types.
Sync to head
2015-05-26 15:44:46 -07:00
Eric Anderson b0619c4c38 Update version to 0.8.0-SNAPSHOT for next cycle 2015-05-26 13:40:13 -07:00
Eric Anderson d9ba2066d4 Release commit for 0.7.0 2015-05-26 13:36:48 -07:00
Xudong Ma 6affc8dcd5 upgrade okhttp to 2.3 2015-05-22 16:45:13 -07:00
zsurocking 4f3641caeb Merge pull request #445 from zsurocking/master
Update AUTH-README.md with Android TLS/ALPN
2015-05-22 13:34:48 -07:00
zsurocking c6ee28cd35 Update AUTH-README.md 2015-05-22 13:34:31 -07:00
nmittler 74cfe6c495 Adding alpn_boot configuration to the parent build file.
This allows all modules access to the alpnboot jar without having to copy&paste the configuration.
2015-05-22 13:05:35 -07:00
zsurocking d09b16d065 Update AUTH-README.md 2015-05-22 11:05:41 -07:00
Xudong Ma 0d480879e5 okhttp: outbound flow control.
Fixes #371
2015-05-21 23:05:54 -07:00
jonathanlin e50f671f1d Change OkHttpClientTransport#start to construct a Socket with the hostname and port if the address is unresolved. 2015-05-21 16:43:22 -07:00
Eric Anderson 5a8e9f4084 Document our findings about GCM performance
We'll probably change our recommendations later to suggesting
netty-tcnative or maybe even conscrypt, but for the moment simply
documenting the issue is productive to prevent surprises.
2015-05-21 15:02:05 -07:00
Eric Anderson 65d73c0dc2 Don't use reflection for epoll/unix domain sockets
The classes are available, even on Windows. Trying to use them though
won't work. You'll get an error like:
java.lang.UnsatisfiedLinkError: no netty-transport-native-epoll in java.library.path
2015-05-21 13:09:24 -07:00
Eric Anderson 3af3d1bee3 Improve invalid argument message for address 2015-05-21 11:33:08 -07:00
Eric Anderson 076532c48b Don't use a list for benchmarks deps
Instead, we can just call compile multiple times; each time just appends
to what is already present.
2015-05-21 11:10:17 -07:00
Eric Anderson 3457199ee3 Fail travis build if codegen isn't committed
This doesn't catch 100% of such problems, as it runs before tests have
been run. However, almost all of our protos are used in 'main' so this
limitation shouldn't be a big deal.

If it does become a problem, we change it from 'before_script' to
'script', but then we'll also need to include gradle build instructions.
2015-05-21 08:33:42 -07:00
Eric Anderson 7d906c569d Fix minor issues with release scripts/documentation 2015-05-20 15:15:18 -07:00
Eric Anderson e03d5c0210 Rename integration-testing to interop-testing
"Interoperability" is a more appropriate name for the tests, since they
are used for testing across different implementations. They will do a
bit of integration testing, like for auth, but this is a smaller scale.

It seems the other languages (Go, C++, Node, PHP, Python, Ruby) are
using "interop" to describe the tests, and the test case specifications
document is named with "interop". After this change, C# will be the only
language calling them "integration" tests.

This change just renames the folder and artifact. We can change the
internal package names later. However, once we do a release, old
artifact names will live forever in Maven Central.
2015-05-20 14:57:36 -07:00
Eric Anderson 7a7450fff9 Commit codegen'd files missing from 43038a5
This allows users to use -PskipCodegen=true
2015-05-20 14:39:00 -07:00