From 0659c2b0a2df37302971936a9fbcf908a781e44f Mon Sep 17 00:00:00 2001 From: Richard Wall Date: Fri, 1 Oct 2021 12:30:43 +0100 Subject: [PATCH] Fix flaky test by using EqualUnsorted to compare Events Supplants https://github.com/jetstack/cert-manager/pull/4297 Signed-off-by: Richard Wall --- pkg/controller/test/context_builder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/test/context_builder.go b/pkg/controller/test/context_builder.go index 515c40c67..d19c0eb8c 100644 --- a/pkg/controller/test/context_builder.go +++ b/pkg/controller/test/context_builder.go @@ -224,7 +224,7 @@ func (b *Builder) AllReactorsCalled() error { func (b *Builder) AllEventsCalled() error { var errs []error - if !util.EqualSorted(b.ExpectedEvents, b.Events()) { + if !util.EqualUnsorted(b.ExpectedEvents, b.Events()) { errs = append(errs, fmt.Errorf("got unexpected events, exp='%s' got='%s'", b.ExpectedEvents, b.Events())) }