Commit Graph

35 Commits

Author SHA1 Message Date
Eric Anderson 080e33effd Align server flags with other languages
There are also no longer any required arguments. The argument processing
flow was changed to match that of the client.
2015-01-16 13:13:57 -08:00
Eric Anderson 6239965030 Improve test client for real cert
The test client can now be used against a server that has properly
configured certificates, instead of just the test server. To reach the
test server, the client needs these arguments:
--use_test_ca=true --server_host_override=foo.test.google.fr

Client no longer has any required arguments, although for any given
setup needing to specify at least one argument is highly likely.

The arguments have been improved in general to hopefully be more
orthogonal and match those of other language's test clients.
2015-01-16 13:07:29 -08:00
ejona 7235a396b8 Remove Service API from ChannelImpl
This change loses asynchronous notification of channel state-change and
a way to wait until the channel is actually connected. Both of these are
expected to be added back as part of a health API. The important
distinction from Service is that ChannelImpl never permanently fails and
can revert from being started to connecting again.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83875407
2015-01-15 13:42:49 -08:00
simonma 828f941e99 Remove dependency on guava Lists for initializing list.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83808289
2015-01-15 13:42:43 -08:00
yangg f8524a17b8 Add package name to the method string.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83353207
2015-01-08 14:43:24 -08:00
rocking ee86ee41a0 Nano proto and Proto3 do no include fields that have their default values in the wire format.
Avoid using hasxxxx

-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82743695
2015-01-08 14:43:23 -08:00
ejona c0f41920bd Remove gRPC v1 support.
No major refactorings/simplifications were done. Only gRPC v1 support
infrastructure was removed.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82737436
2015-01-08 14:43:23 -08:00
ejona 1c20eb6cef Implement cancel_after_* integration tests
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82734780
2015-01-08 14:43:22 -08:00
ejona 42fcc501b9 Implement empty_stream integration test
The test was going to use a queue like ping_pong, but using a mock
proved much simpler. Thus, I also updated ping_pong to use the simpler
model, because it is useful for the two tests to be similar.

InProcessTransportTest failed for empty_stream due to gRPC v2 issues,
and so instead of ignoring emptyStream() I found the broken tests that
were preventing swapping to gRPC v2 and ignored them instead.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82733943
2015-01-08 14:43:22 -08:00
ejona ca749c369f Export test_service codegen source instead of binary lib
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82164712
2015-01-08 14:43:21 -08:00
nathanmittler 164b734aa9 Adding gradle build for Java grpc
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82152044
2015-01-08 14:43:21 -08:00
nathanmittler 66ce6677b2 Updating version of gRPC maven build to 0.1.0-SNAPSHOT.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82151533
2015-01-08 14:43:20 -08:00
ejona 42989a83ff Allow killing test server/client
mvn exec:exec doesn't kill the child process when Maven is killed. Now
we just run ourselves, but have Maven do as much heavy lifting as able.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81736090
2015-01-08 14:43:18 -08:00
ejona fc30031fd1 Change default gRPC protocol to v2.
Any place that force-sets the protocol to 2 or assumes the old value
is now removed. Unfortunately, it seems InProcessTransportTest has
some non-obvious dependency on gRPC v1.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81597524
2015-01-08 14:43:18 -08:00
simonma 682f8aa2cb Correct comment
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81595612
2015-01-08 14:43:18 -08:00
nathanmittler 70341df582 Fixing Maven build for gRPC Java.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81456318
2015-01-08 14:43:17 -08:00
lryan 56e307fcb6 Add BSD license header to all source files
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81447025
2015-01-08 14:43:17 -08:00
nathanmittler abdbf4940a Changing TestServiceServer to use ListenableFuture for determining when the server has been successfully started.
Previously, it was creating a client socket to determine when the server
was bound to the port. This causes the Netty server to create and then
quickly fail a client channel which was generating noisy error logs.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=80546045
2015-01-08 14:43:12 -08:00
ejona f96e7e8c6c Use real TLS security by default.
The client now checks certificates and performs hostname verification.
Tests check certificates, so the server uses a cert that the client
trusts.

Only the client portion of SslContextFactory was previously used.
Applications that want to ignore certificates (i.e., for testing) can
use io.netty.handler.ssl.util.InsecureTrustManagerFactory instead.

The MOE configuration was already failing to work, and so required the
simple mapping for examples in addition to what was needed for the new
certs.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=80434148
2015-01-08 14:43:11 -08:00
zhangkun b186b377e8 Remove client-streaming and bi-di streaming methods from blocking client interface.
The current signatures are not more useful than the async counterparts,
we'd rather not have them until more sepcific requirement comes up.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=80402647
2015-01-08 14:43:11 -08:00
nathanmittler 0d8477c85c Adding crude outbound flow control to OkHttp transport.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=80390743
2015-01-08 14:43:10 -08:00
ejona 28a2abaa15 Enable full-size payloads in integration tests.
Netty's flow control bug is now fixed.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=80298613
2015-01-08 14:43:09 -08:00
ejona ba653d4bd0 Move StubConfigTest to third_party
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=79430433
2015-01-08 14:43:05 -08:00
ejona 2a93c47657 Remove GrpcServer to allow more tests to move to third_party.
GrpcServer had the same restriction that GrpcClient did: it had a
single enum of all transports that prevents using it in third_party.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=79428440
2015-01-08 14:43:05 -08:00
zhangkun a71d887661 Make all transport factories package-private in favor of channel builders.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=79367593
2015-01-08 14:43:04 -08:00
ejona 3d4ea0d348 Implement standard integration tests (almost).
Our pre-existing tests were slightly different from the integration
tests to be implemented in each language. Change our implementation to
match.

Unfortunately, the standard tests actually trigger Netty flow control
bugs, so we decrease stream sizes to <64K as a workaround.

Because the tests now compare to golden responses, they detected that
the cpp server was sending all a's instead of all 0s. That is now fixed.

We receive errors hitting CPP server for empty_unary and the various
streaming tests, so java_cpp isn't enabled in interop_scenarios.txt.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=79086882
2015-01-08 14:43:03 -08:00
ejona e813eaae2f [3/3] Use AbstractTransportTest for test case impls in TestServiceClient.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78862990
2015-01-08 14:43:03 -08:00
ejona 97d3ade2ea [2/3] Use transport builders instead of ClientBootstrap.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78861122
2015-01-08 14:43:03 -08:00
ejona 9a5a8de65d [1/3] Move AbstractTransportTest to third_party.
This required making it no longer depend on GrpcClient. Instead, we now
use the builders that make using GrpcClient almost completely obsolete.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78860648
2015-01-08 14:43:02 -08:00
nathanmittler ffc18f6c57 Adding MOE configuration for grpc_java.
The TestService proto is temporarily supplied as a generated jar (until the open source protoc compiler supports grpc).

Copies of messages.proto, empty.proto, and message_set.proto are scrubbed and included in the source under integration-testing.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78711468
2015-01-08 14:43:02 -08:00
lryan 8fc81f4a37 Fix compile error using new ProtoUtils
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78611659
2015-01-08 14:43:01 -08:00
nathanmittler 29cbef1f9b Renaming gRPC-java "newtransport" package to just "transport".
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78596663
2015-01-08 14:43:00 -08:00
ejona 2dbae4d4f2 Use zero-filled payload for UNCOMPRESSED.
Previously we were using English text, but this just adds extra effort for all
the other languages that will need to implement servers. The integration test
case descriptions uses zero-filled bytes.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78477356
2015-01-08 14:42:59 -08:00
nathanmittler 0304b3d6b2 Cleaning up various compiler warnings in preparation for opensource.
overview:
1) Lots of @SuppressWarnings :)

2) Remove dependencies on StandardCharsets.XXX (which is Java 7)

3) Moved testing/utils/ssl/* to .../stubby/util so that the netty transport doesn't depend directly on the testing module.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78460727
2015-01-08 14:42:59 -08:00
nathanmittler 905d387e4f Porting GrpcClient and GrpcServer to third_party.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78372524
2015-01-08 14:42:58 -08:00