From 73d389298c9fa3faf21a87973991c8820781aa58 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Fri, 20 Jan 2023 13:52:37 -0800 Subject: [PATCH 1/2] Bump apiserver --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 171be8e1..eeda3ccc 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/pborman/uuid v1.2.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.12.1 - github.com/rancher/apiserver v0.0.0-20221229135954-26bed53611c4 + github.com/rancher/apiserver v0.0.0-20230120214941-e88c32739dc7 github.com/rancher/dynamiclistener v0.3.5 github.com/rancher/kubernetes-provider-detector v0.1.2 github.com/rancher/norman v0.0.0-20221205184727-32ef2e185b99 diff --git a/go.sum b/go.sum index dd01376e..d7d381c9 100644 --- a/go.sum +++ b/go.sum @@ -502,8 +502,8 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rancher/apiserver v0.0.0-20221229135954-26bed53611c4 h1:eOq/tiwMCzcwexrbUQ9Agd9PHhwwtH9/G4usE0MoN8s= -github.com/rancher/apiserver v0.0.0-20221229135954-26bed53611c4/go.mod h1:xwQhXv3XFxWfA6tLa4ZeaERu8ldNbyKv2sF+mT+c5WA= +github.com/rancher/apiserver v0.0.0-20230120214941-e88c32739dc7 h1:Ob72oeF0iM8gWEMh+qKT5e1pzTwQU70I5kx4gMaqCmI= +github.com/rancher/apiserver v0.0.0-20230120214941-e88c32739dc7/go.mod h1:xwQhXv3XFxWfA6tLa4ZeaERu8ldNbyKv2sF+mT+c5WA= github.com/rancher/client-go v1.25.4-rancher1 h1:9MlBC8QbgngUkhNzMR8rZmmCIj6WNRHFOnYiwC2Kty4= github.com/rancher/client-go v1.25.4-rancher1/go.mod h1:8trHCAC83XKY0wsBIpbirZU4NTUpbuhc2JnI7OruGZw= github.com/rancher/dynamiclistener v0.3.5 h1:5TaIHvkDGmZKvc96Huur16zfTKOiLhDtK4S+WV0JA6A= From 9a386b205c44a17fbd76a4b9f729aa24849d7453 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Fri, 20 Jan 2023 14:19:05 -0800 Subject: [PATCH 2/2] Fix resource counts unit tests Increase the timeout slightly to avoid the occasional premature timeout. Fix error message typo. --- pkg/resources/counts/buffer_test.go | 4 ++-- pkg/resources/counts/counts_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/resources/counts/buffer_test.go b/pkg/resources/counts/buffer_test.go index 3219af47..381b70a3 100644 --- a/pkg/resources/counts/buffer_test.go +++ b/pkg/resources/counts/buffer_test.go @@ -64,7 +64,7 @@ func Test_countsBuffer(t *testing.T) { } // due to complexities of cycle calculation, give a slight delay for the event to actually stream - output, err := receiveWithTimeout(outputChannel, debounceDuration+time.Millisecond*1) + output, err := receiveWithTimeout(outputChannel, debounceDuration+time.Millisecond*10) assert.NoError(t, err, "did not expect an error when receiving value from channel") outputCount := output.Object.Object.(Count) assert.Len(t, outputCount.Counts, test.numInputEvents) @@ -93,7 +93,7 @@ func receiveWithTimeout(input chan types.APIEvent, duration time.Duration) (*typ case value := <-input: return &value, nil case <-time.After(duration): - return nil, fmt.Errorf("timeout error, no value recieved after %f seconds", duration.Seconds()) + return nil, fmt.Errorf("timeout error, no value received after %f seconds", duration.Seconds()) } } diff --git a/pkg/resources/counts/counts_test.go b/pkg/resources/counts/counts_test.go index bf7567e2..755706e0 100644 --- a/pkg/resources/counts/counts_test.go +++ b/pkg/resources/counts/counts_test.go @@ -177,7 +177,7 @@ func receiveWithTimeout(input chan types.APIEvent, duration time.Duration) (*typ case value := <-input: return &value, nil case <-time.After(duration): - return nil, fmt.Errorf("timeout error, no value recieved after %f seconds", duration.Seconds()) + return nil, fmt.Errorf("timeout error, no value received after %f seconds", duration.Seconds()) } }