You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main goal of this change is to offer a `.RPCClientConn()` method
on test servers.
To achieve this, it was necessary to lift the code previously in
`cli.getClientGRPCConn` into a more reusable version of it,
now hosted in `rpc.NewClientContext()`.
I also took the opportunity to remove the dependency of `rpc.Context`
on `base.Config`, by spelling out precisely which fields are necessary
to RPC connections.
Numerous tests could be simplified as a result. In particular:
- Complex sequences of calls to open a client RPC connection to a test
server can be simplified to a single call to `.RPCClientConn()`.
- `testutils.NewNodeTestContext` and `NewTestBaseContext` are not
necessary any more. They were previously used as input to
build instances of `rpc.ContextOptions`. The latter can now
be built using `rpc.DefaultContextOptions()` instead.
- `(*localestcluster.LocalTestCluster).Start()` does
not need a `*base.Config` any more and so its call sites can be
simplified.
Release note: None
0 commit comments