Commit Graph

135 Commits

Author SHA1 Message Date
Carl Mastrangelo f13fbaa782 interop-testing: update testing protos to include compression fields 2016-05-13 11:00:33 -07:00
Jakob Buchgraber 46edcad0c1 Don't enforce a timeout in stress test client. Fixes #1812 (#1823) 2016-05-13 19:18:13 +02:00
Carl Mastrangelo f85ecdfbc4 interop-testing: Print JVM Flags by default for Stress tests 2016-05-11 13:20:23 -07:00
Eric Anderson 83bf5e6f42 Fix flakiness of testConfigureDeadlineNanoTime with warmup
Without the warm up I saw large deltas, like 2,262,968ns and
1,712,558ns, on my machine. With the single-line warm up the deltas
decreased dramitically, like 385ns and 536ns. Since our times are so
much better now, decreasing the required delta to 10ms seems reasonable.

This would seem to support the theory that the flakiness was caused by
the class loader, which may even be doing I/O.

Fixes #1646
2016-05-06 09:41:46 -07:00
ZHANG Dapeng aed886d8de use Jetty ALPN agent instead of Jetty ALPN
#1497
2016-05-02 14:01:36 -07:00
Carl Mastrangelo 3c5b5a5e09 Begin v0.15.0 Cycle 2016-04-29 13:54:18 -07:00
Eric Anderson ac4168a236 Revert "Update proto packages to reflect directory structure"
This reverts commit 8825f355df.

The commit changed the package name of services that were used across
languages. That broke their functionality pretty severely. The changes
require more coordination with others.
2016-04-28 10:42:47 -07:00
Jakob Buchgraber cd89dde625 Fix race in StressTestClientTest.gaugesShouldBeExported(). Fixes #1695 (#1728) 2016-04-27 15:20:11 -07:00
Carl Mastrangelo 8825f355df Update proto packages to reflect directory structure 2016-04-27 14:16:28 -07:00
Carl Mastrangelo 38a91f83e1 Fix lint warnings found on internal import 2016-04-26 13:21:25 -07:00
nmittler 7e8b504e3f Add javadoc to grpc codegen based on proto docs
Fixes #1612
2016-04-22 13:23:17 -07:00
Kun Zhang 8502730d07 Attach an exception to client-initiated CANCELLED.
This tells us where is the cancellation initiated, which is important
information for debugging.
2016-04-20 17:38:01 -07:00
Carl Mastrangelo fe7e8a00bc Use correct Guava API in stress test client 2016-04-20 11:58:39 -07:00
Eric Anderson 9bc5d93e4a Mark generated abstract class as Experimental 2016-04-19 12:35:04 -07:00
Eric Anderson 6ab27aba13 Update checkstyle version and sync style updates 2016-04-18 09:15:25 -07:00
buchgr 5d22e065db Add stress test client. Fixes #1584
As of the discussion in #1584, the client does not
support TLS and interop tests that require auth are
yet to be implemented.
It has the same functionality as the C++ stress test client.
2016-04-14 17:31:26 -07:00
buchgr fd8fd517d2 Context deadline propagation should cascade. Fixes #1205
A call's timeout as specified in its metadata should be set depending
on the deadline of the call's context. If a call has an explicit deadline
set (through CallOptions), then the smaller deadline (from context and call options)
should be used to compute the timeout.

Also, a new method Contexts.statusFromCancelled(Context) was introduced that attempts
to map a canceled context to a gRPC status.
2016-04-12 21:43:49 +02:00
Lukasz Strzalkowski 363e0f6cfc Print compiler version number in generated files 2016-04-11 19:35:19 -07:00
Lukasz Strzalkowski 2fbf142a41 Provide base methods for Abstract stub
Default implementation returns status UNIMPLEMENTED. This allows adding
new methods to services without breaking existing code.
2016-04-11 16:38:23 +02:00
Łukasz Strzałkowski 90fbf9b274 Adapt BindableService in ServerBuilder#addService
Makes binding services to server as simple as it can get.
2016-04-08 11:14:26 -07:00
Eric Anderson 73a2b77ece Deflake StubConfigTest.testConfigureDeadlineNanoTime
Just bump the tolerance, based on the failures we've seen.

Fixes #1646
2016-04-08 09:45:43 -07:00
Lukasz Strzalkowski f8b71e72b3 Add Abstract{ServiceName} class in compiled service class 2016-04-07 17:39:17 -07:00
Carl Mastrangelo d4615ff251 Fix flaky deadline test 2016-03-29 11:20:32 -07:00
buchgr 6e679401ea Allow Deadline.timeRemaining() to return a negative time offset. 2016-03-25 22:15:30 +01:00
buchgr 32ddf9f381 Make CallOptions and AbstractStub use Deadline.
- Made CallOptions use the Deadline type instead of a
  long to represent a deadline.
- Added new methods CallOptions.withDeadline(Deadline) and
  AbstractStub.withDeadline(Deadline). The methods are
  marked experimental, as the Deadline class is marked
  experimental. These methods are meant to replace
  CallOptions.withDeadlineNanoTime(Long) and
  AbstractStub.withDeadlineNanoTime(Long), which have
  been deprecated.
- Updated CallOptions.toString() to include all fields.
2016-03-25 22:15:22 +01:00
Carl Mastrangelo 65d3847d14 Remove references to Throwable.propagate 2016-03-22 15:47:52 -07:00
Eric Anderson 3a920cdcca Add missing generics to some ServerCall usages 2016-03-17 17:05:25 -07:00
Lukasz Strzalkowski c3011b0798 Move server call keys to ServerCall class 2016-03-17 19:46:26 -04:00
Lukasz Strzalkowski 6a67a97a73 Add attributes to ServerCall 2016-03-16 15:39:42 -07:00
Eric Anderson cf86d81ef7 Rename older AbstractTransportTest to AbstractInteropTest
There are two AbstractTransportTests. The newest one is the more aptly
named, so rename the older one to AbstractInteropTest to remove name
collision when speaking.

Fixes #1484
2016-03-13 23:01:04 -07:00
nmittler b9196e3084 Adding RunWith annotation to ConcurrencyTest 2016-03-08 06:16:58 -08:00
Carl Mastrangelo ffe0dce85f Add missing override annotation to generated protos 2016-03-04 14:15:02 -08:00
Matt Hildebrand 56d9b17838 Test that gRPC clients and servers can handle concurrent RPCs. 2016-03-03 16:40:54 -08:00
Carl Mastrangelo 40d9cd1941 Add more debug output in TlsTest 2016-03-03 11:35:19 -08:00
Carl Mastrangelo 72f1e88d78 Inlcude the file that was used to generate service descriptors 2016-03-01 09:22:10 -08:00
Matt Hildebrand de72f6915d Test that a GRPC client rejects untrusted server certs. 2016-02-29 19:05:19 -08:00
Louis Ryan 887064d30e Use latching to enforce expected events are received 2016-02-25 17:33:54 -08:00
Louis Ryan caad0294b9 Revert the cascading test for the moment as its flaky 2016-02-19 10:28:17 -08:00
Louis Ryan 7fc986e6d0 Fix flakiness in Cascading cancellation tests
Add explicit shutdown for other executors
2016-02-17 16:17:22 -08:00
Louis Ryan 12a4b21f74 Integration tests for testing cascading cancellation. 2016-02-17 10:35:37 -08:00
nmittler 1dce8df077 Switching to netty-tcnative-boringssl-static 2016-02-16 13:11:45 -08:00
Carl Mastrangelo bbec13ee0c Fix race condition in Compression Test 2016-02-04 09:23:43 -08:00
Carl Mastrangelo a3c79e87ae Add a simple compression API 2016-02-01 12:56:21 -08:00
Matt Hildebrand cdb9ca1912 Run TLS integration tests using OpenSSL also. 2016-01-29 22:06:19 -05:00
Kun Zhang e2ed2e8f03 Upgrade to protobuf-3.0.0-beta-2 and protobuf-nano-3.0.0-alpha-5
Update option name that disables protobuf tests.
2016-01-27 23:32:01 -08:00
Eric Anderson 4168f67e38 Optimize blocking calls to avoid app thread pool
This reduces the necessary number of threads in the application executor
and provides a small improvement in latency (~15μs, which is normally in
the noise, but would be a 5% improvement).

Benchmark                         (direct)  (transport)  Mode  Cnt       Score        Error  Units
Before:
TransportBenchmark.unaryCall1024      true    INPROCESS  avgt   10    1566.168 ±     13.677  ns/op
TransportBenchmark.unaryCall1024     false    INPROCESS  avgt   10   35769.532 ±   2358.967  ns/op
After:
TransportBenchmark.unaryCall1024      true    INPROCESS  avgt   10    1813.778 ±     19.995  ns/op
TransportBenchmark.unaryCall1024     false    INPROCESS  avgt   10   18568.223 ±   1679.306  ns/op

The benchmark results are exactly what we would expect, assuming that
half of the benefit of direct is on server and half on client:
1566 + (35769 - 1566) / 2 = 18668 ns --vs-- 18568 ns

It is expected that direct=true would get worse, because
SerializingExecutor is now used instead of
SerializeReentrantCallsDirectExecutor plus the additional cost of
ThreadlessExecutor.

In the future we could try to detect the ThreadlessExecutor and ellide
Serializ*Executor completely (as is possible for any single-threaded
executor). We could also optimize the queue used in ThreadlessExecutor
to be single-producer, single-consumer. I don't expect to do those
optimizations soon, however.
2016-01-26 12:41:50 -08:00
Eric Anderson fe5e624153 Avoid cancel before start, which is not handled in transports
When triggered, it caused the ClientCall.Listener never to complete.
Fixes #1343

The new test doesn't actually fail on my machine with the old code, but
we would hope it would be flaky. Since a race is involved, I don't
expect a more reliable test.
2016-01-25 13:20:10 -08:00
Eric Anderson 15d86d9c42 Parameterize TlsTest for TLS provider 2016-01-25 13:17:19 -08:00
Eric Anderson 0a2a4ec4d2 Move resource freeing out of test methods
This avoids the try-finally, which would have gotten even larger to
shutdown the channels.
2016-01-25 13:17:19 -08:00
Eric Anderson 4aee912bce Fix broken noClientAuthFailure test
The client didn't have the trust manager set, so the RPC would fail due
to server-certificate verification, not lack of client auth.

With this change, noClientAuthFailure now fails with tcnative but still
passes with Jetty ALPN.

basicClientServerIntegrationTest seems to be working for me, so I'm
enabling it.
2016-01-22 12:59:36 -08:00