In this test, we
1. make a streaming RPC on a connection
1. graceful stop it to send a GOAWAY
1. hard stop it, so the client will create a connection to another server
Before this fix, 2 and 3 can happen too soon, so the RPC in 1 would fail
and then transparent retry (because the stream is unprocessed by the
server in that case).
This retry attempt could pick the new connection, and then the RPC would
block until timeout.
After this streaming RPC fails, we make unary RPCs with the same
deadline (note: deadline not timeout) as the streaming RPC and expect
them to succeed. But they will also fail due to timeout.
The fix is to make a round-trip on the streaming RPC first, to make sure
it actually goes on the first connection.
* This will be used in certprovider tests where we would want more than one server and client certs.
* Also, updated existing usages of these certs to point to the new files.
* Also copy over the required certs/key files. This avoids the example gomodule from depending on gRPC testdata package which should be able to change independently.
* Fix interop test's SAN.
Replace various //go:generate lines and regenerate.sh scripts with a
single, top-level regenerate.sh that regenerates all .pb.go files.
Placing generation in a single script ensures that all files are
generated with similar parameters. The new regenerate.sh uses the
protoc-gen-go version defined in test/tools/go.mod and automatically
handles new .proto files as they are added.
Do some minor refactoring on .proto files: Every file now has a
go_package option (which will be required by a future version of the
code generator), and file imports are all relative to the repository
root.
* Modified tests to use tlogger.
* Fail on errors, with error expectations.
* Added expects and MixedCapsed grpclb_config tests
* Moved tlogger to grpctest, moved leakcheck tester to grpctest.go
* Added ExpectErrorN()
* Removed redundant leak checks
* Fixed new test
* Made tlogger globals into tlogger methods
* ErrorsLeft -> EndTest
* Removed some redundant lines
* Fixed error in test and empty map in EndTest
Generated protobuf messages contain internal data structures
that general purpose comparison functions (e.g., reflect.DeepEqual,
pretty.Compare, etc) do not properly compare. It is already the case
today that these functions may report a difference when two messages
are actually semantically equivalent.
Fix all usages by either calling proto.Equal directly if
the top-level types are themselves proto.Message, or by calling
cmp.Equal with the cmp.Comparer(proto.Equal) option specified.
This option teaches cmp to use proto.Equal anytime it encounters
proto.Message types.
Nobody should directly need to reference these packages.
This is technically a breaking change. However:
- Package dns was exporting a NewBuilder method. This should never have been necessary to use, but if so, it can be replaced by importing the "grpc" package and then using resolver.Get("dns").
- Package passthrough was not exporting any symbols and there was never a need to even blank-import it.
After as much searching as possible, it appears nobody in the open source community is referencing either of these packages.
* Make healthcheck tests in end2end_test.go more readable.
- Made these tests use the default health service implementation
wherever possible.
- Refactored some common code used in these tests into helper functions.
- Added function comments for all these tests to improve readability.
In a follow up PR, I will be moving all these tests into
healthcheck_test.go.