Skip to content

Commit

Permalink
Return new default GRPC client instantiation to every request (kubern…
Browse files Browse the repository at this point in the history
  • Loading branch information
ciarams87 authored and BobyMCbobs committed Jul 10, 2024
1 parent 7e0f09d commit 1aff171
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 1aff171

Please sign in to comment.