This repo runs a suite of cross-compatibility tests using every combination of the following clients and servers:
- connect-go (Connect protocol, gRPC protocol, and gRPC-web protocol)
- connect-es (Connect for Node.js serving Connect protocol, gRPC protocol, and gRPC-web protocol)
- grpc-go
- connect-go (Connect protocol, gRPC protocol and gRPC-web protocol)
- connect-es (Connect for Web using Connect protocol and gRPC-web protocol)
- grpc-go
- grpc-web
The test suite is run daily against the latest commits of connect-go, connect-es and protobuf-es to ensure that we are continuously testing for compatibility.
For more on Connect, see the announcement blog post, the documentation on connectrpc.com (especially the Getting Started guide for Go), or the demo service.
The test suite is a superset of gRPC and gRPC-web interop tests. Clients and servers use the gRPC interop Protobuf definitions and cover a range of expected behaviors and functionality for gRPC and Connect.
Test Case | connect-go , grpc-go |
connect-es , grpc-web |
---|---|---|
empty_unary |
✓ | ✓ |
cacheable_unary |
✓ | ✓ |
large_unary |
✓ | ✓ |
client_streaming |
✓ | |
server_streaming |
✓ | ✓ |
ping_pong |
✓ | |
empty_stream |
✓ | ✓ |
fail_unary |
✓ | ✓ |
fail_server_streaming |
✓ | ✓ |
fail_server_streaming_after_response |
✓ | |
cancel_after_begin |
✓ | |
cancel_after_first_response |
✓ | |
timeout_on_sleeping_server |
✓ | ✓ |
custom_metadata |
✓ | ✓ |
duplicated_custom_metadata |
✓ | |
status_code_and_message |
✓ | ✓ |
special_status_message |
✓ | ✓ |
unimplemented_method |
✓ | ✓ |
unimplemented_server_streaming_method |
✓ | ✓ |
unimplemented_service |
✓ | ✓ |
unimplemented_server_streaming_service |
✓ | ✓ |
unresolvable_host |
✓ |
RPC: EmptyCall
Client calls EmptyCall
with an Empty
request and expects no errors and an empty response.
RPC: UnaryCall
Client calls UnaryCall
with a payload size of 250 KiB bytes and expects a response with a
payload size of 500 KiB and no errors.
RPC: CacheableUnaryCall
Client calls CacheableUnaryCall
with a small payload. Expected to be called via GET
request when called with the Connect protocol.
RPC: StreamingInputCall
Client calls StreamingInputCall
then sends 4 requests with a payload size of 250 KiB,
8 bytes, 1 KiB, and 32 KiB and expects the aggregated payload size to be 289800 bytes when
the client closes the stream and no errors.
RPC: StreamingOutputCall
Client calls StreamingOutputCall
and receives exactly 4 times, expecting responses with
a payload size of 250 KiB, 8 bytes, 1 KiB, and 32 KiB, and no errors.
RPC: FullDuplexCall
Client sends exactly 4 requests over a FullDuplexCall
stream:
- A request with a payload of 250 KiB, expecting a response with a payload of 500 KiB
- A request with a payload of 8 bytes, expecting a response with a payload of 16 bytes
- A request with a payload of 1 KiB, expecting a response with a payload of 2 KiB
- A request with a payload of 32 KiB, expecting a response with a payload of 64 KiB
Client asserts that payload sizes are in order and then closes the stream. No errors are expected.
RPC: FullDuplexCall
/StreamingOutputCall
Client calls FullDuplexCall
(web client calls StreamingOutputCall
) and then closes. No
response or errors are expected.
RPC: FailUnary
Client calls FailUnary
which always responds with an error with status RESOURCE_EXHAUSTED
and a non-ASCII message with error details.
RPC: FailStreamingOutputCall
Client calls FailStreamingOutputCall
which always responds with an error with status RESOURCE_EXHAUSTED
and a non-ASCII message with error details.
RPC: FailStreamingOutputCall
Client calls FailStreamingOutputCall
, and asks for four response messages. The server
responds with the messages, the status RESOURCE_EXHAUSTED
and a non-ASCII message, and
error details. The client verifies that four response messages and the error status with
code, message, and details was received.
RPC: StreamingInputCall
Client calls StreamingInputCall
, cancels the context, then closes the stream, and expects
an error with the code CANCELED
.
RPC: FullDuplexCall
Client calls FullDuplexCall
, receives a response, then cancels the context, then closes
the stream, and expects an error with the code CANCELED
.
RPC: FullDuplexCall
/StreamingOutputCall
Client calls FullDuplexCall
(web client calls StreamingOutputCall
) with a timeout, closes
the stream and expects to receive an error with status DEADLINE_EXCEEDED
.
RPC: UnaryCall
, StreamingOutputCall
, FullDuplexCall
Client calls UnaryCall
with a request with a custom header and custom binary trailer attached
and expects the same metadata to be attached to the response. Client calls StreamingOutputCall
with a request with a custom header and custom binary trailer and expects the same metadata
to be attached to the response when stream is closed. Client calls FullDuplexCall
with a request with a custom header and custom binary trailer and expects the same metadata
to be attached to the response when stream is closed. The web
flows only test the unary and
server streaming RPC.
RPC: UnaryCall
, StreamingOutputCall
, FullDuplexCall
This is the same as the custom_metadata
test but uses metadata values that have ,
separators
to test header and trailer behaviour.
RPC: UnaryCall
, FullDuplexCall
Client calls UnaryCall
with a request containing a code
and message
and expects an error
with the provided status code
and message
in response. Client calls FullDuplexCall
with
a request containing a code
and message
, closes the stream, and expects to receive an
error with the provided status code
and message
. The web
flows only test the unary RPC.
RPC: UnaryCall
Client calls UnaryCall
with a request containing a code
and message
with whitespace
characters and Unicode and expects an error with the provided status code
and message
in response.
RPC: N/A
Client calls UnimplementedCall
with an empty request and expects an error with the status
UNIMPLEMENTED
.
RPC: N/A
Client calls UnimplementedStreamingOutputCall
with an empty request and expects an error with the status
UNIMPLEMENTED
.
RPC: N/A
Client calls an unimplemented service and expects an error with the status UNIMPLEMENTED
.
RPC: N/A
Client calls UnimplementedStreamingOutputCall
to an unimplemented service with an empty request and expects
an error with the status UNIMPLEMENTED
.
RPC: N/A
Client calls an unresolvable host and expects an error with the status UNAVAILABLE
.
There are Github Actions workflows for go and web configured for running the daily conformance suite against the latest commits of connect-go, connect-es and protobuf-es.
In addition, there is a Github Action workflow for C++ which runs a gRPC C++ client against the conformance suite.
To run these tests locally, you'll need Docker. The test suite uses Docker Compose. Please note, that if you are running the tests on MacOS, you'll need to enable Docker Compose V2. In short, Docker Desktop -> Preferences -> General -> Use Docker Compose V2, then click Apply & Restart.
You can run the tests using make dockercomposetest
.
This conformance suite works with the most recent release of Go.
Unlike Connect's Go implementation, the conformance suite has no exported APIs and makes no backward compatibility guarantees. We'd like to release it as an interoperability testing toolkit eventually, but don't have a concrete timeline in mind.
Offered under the Apache 2 license.