Skip to content

Commit

Permalink
Return new default GRPC client instantiation to every request (#3130)
Browse files Browse the repository at this point in the history
  • Loading branch information
ciarams87 committed Jun 14, 2024
1 parent 4622e74 commit 5f400a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions conformance/utils/grpc/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@ func validateExpectedResponse(t *testing.T, expected ExpectedResponse) {
func MakeRequestAndExpectEventuallyConsistentResponse(t *testing.T, c Client, timeoutConfig config.TimeoutConfig, gwAddr string, expected ExpectedResponse) {
t.Helper()
validateExpectedResponse(t, expected)
if c == nil {
c = &DefaultClient{Conn: nil}
}
defer c.Close()
sendRPC := func(elapsed time.Duration) bool {
resp, err := c.SendRPC(t, gwAddr, expected, timeoutConfig.MaxTimeToConsistency-elapsed)
Expand Down
3 changes: 0 additions & 3 deletions conformance/utils/suite/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,6 @@ func NewConformanceTestSuite(options ConformanceOptions) (*ConformanceTestSuite,
}

grpcClient := options.GRPCClient
if grpcClient == nil {
grpcClient = &grpc.DefaultClient{Conn: nil}
}

installedCRDs := &apiextensionsv1.CustomResourceDefinitionList{}
err := options.Client.List(context.TODO(), installedCRDs)
Expand Down

0 comments on commit 5f400a8

Please sign in to comment.