diff --git a/test/rekt/features/broker/data_plane.go b/test/rekt/features/broker/data_plane.go index 9ed3bb44b41..24ad575b0b3 100644 --- a/test/rekt/features/broker/data_plane.go +++ b/test/rekt/features/broker/data_plane.go @@ -212,7 +212,7 @@ func brokerAcceptsBinaryContentMode(ctx context.Context, t feature.T) { )(ctx, t) store := eventshub.StoreFromContext(ctx, source) - events := knconf.Correlate(store.AssertAtLeast(t, 2, knconf.SentEventMatcher(""))) + events := knconf.Correlate(store.AssertAtLeast(ctx, t, 2, knconf.SentEventMatcher(""))) for _, e := range events { if e.Response.StatusCode < 200 || e.Response.StatusCode > 299 { t.Errorf("Expected statuscode 2XX for sequence %d got %d", e.Response.Sequence, e.Response.StatusCode) @@ -245,7 +245,7 @@ func brokerAcceptsStructuredContentMode(ctx context.Context, t feature.T) { )(ctx, t) store := eventshub.StoreFromContext(ctx, source) - events := knconf.Correlate(store.AssertAtLeast(t, 2, knconf.SentEventMatcher(""))) + events := knconf.Correlate(store.AssertAtLeast(ctx, t, 2, knconf.SentEventMatcher(""))) for _, e := range events { if e.Response.StatusCode < 200 || e.Response.StatusCode > 299 { t.Errorf("Expected statuscode 2XX for sequence %d got %d", e.Response.Sequence, e.Response.StatusCode) @@ -278,7 +278,7 @@ func brokerRejectsUnknownCEVersion(ctx context.Context, t feature.T) { // response was what was expected. // Note: We pass in "" for the match ID because when we construct the headers manually // above, they do not get stuff into the sent/response SentId fields. - events := knconf.Correlate(store.AssertAtLeast(t, 2, knconf.SentEventMatcher(""))) + events := knconf.Correlate(store.AssertAtLeast(ctx, t, 2, knconf.SentEventMatcher(""))) for _, e := range events { // Make sure HTTP response code is 4XX if e.Response.StatusCode < 400 || e.Response.StatusCode > 499 { @@ -307,7 +307,7 @@ func brokerAcceptResponseSuccess(ctx context.Context, t feature.T) { )(ctx, t) store := eventshub.StoreFromContext(ctx, source) - events := knconf.Correlate(store.AssertAtLeast(t, 2, knconf.SentEventMatcher(""))) + events := knconf.Correlate(store.AssertAtLeast(ctx, t, 2, knconf.SentEventMatcher(""))) for _, e := range events { // Make sure HTTP response code is 200 if e.Response.StatusCode < 200 || e.Response.StatusCode > 299 { @@ -343,7 +343,7 @@ func brokerRejectsGetRequest(ctx context.Context, t feature.T) { // response was what was expected. // Note: We pass in "" for the match ID because when we construct the headers manually // above, they do not get stuff into the sent/response SentId fields. - events := knconf.Correlate(store.AssertAtLeast(t, 2, knconf.SentEventMatcher(""))) + events := knconf.Correlate(store.AssertAtLeast(ctx, t, 2, knconf.SentEventMatcher(""))) for _, e := range events { // Make sure HTTP response code is 405 if e.Response.StatusCode != 405 { @@ -390,7 +390,7 @@ func brokerRejectsMalformedCE(ctx context.Context, t feature.T) { // response was what was expected. // Note: We pass in "" for the match ID because when we construct the headers manually // above, they do not get stuff into the sent/response SentId fields. - events := knconf.Correlate(store.AssertAtLeast(t, 2, knconf.SentEventMatcher(""))) + events := knconf.Correlate(store.AssertAtLeast(ctx, t, 2, knconf.SentEventMatcher(""))) for _, e := range events { // Make sure HTTP response code is 4XX if e.Response.StatusCode < 400 || e.Response.StatusCode > 499 { diff --git a/test/rekt/features/broker/feature.go b/test/rekt/features/broker/feature.go index 02295ec9e2f..fb22ed48405 100644 --- a/test/rekt/features/broker/feature.go +++ b/test/rekt/features/broker/feature.go @@ -838,6 +838,7 @@ func assertEnhancedWithKnativeErrorExtensions(sinkName string, matcherfns ...fun matchers[i] = fn(ctx) } _ = eventshub.StoreFromContext(ctx, sinkName).AssertExact( + ctx, t, 1, eventasssert.MatchKind(eventshub.EventReceived), diff --git a/test/rekt/features/channel/data_plane.go b/test/rekt/features/channel/data_plane.go index c508804ae70..d8077037712 100644 --- a/test/rekt/features/channel/data_plane.go +++ b/test/rekt/features/channel/data_plane.go @@ -138,7 +138,7 @@ func channelRejectsMalformedCE(ctx context.Context, t feature.T) { // response was what was expected. // Note: We pass in "" for the match ID because when we construct the headers manually // above, they do not get stuff into the sent/response SentId fields. - events := knconf.Correlate(store.AssertAtLeast(t, 2, knconf.SentEventMatcher(""))) + events := knconf.Correlate(store.AssertAtLeast(ctx, t, 2, knconf.SentEventMatcher(""))) for _, e := range events { // Make sure HTTP response code is 4XX if e.Response.StatusCode < 400 || e.Response.StatusCode > 499 { diff --git a/test/rekt/features/channel/features.go b/test/rekt/features/channel/features.go index 7b059ba3625..2ad23866a9d 100644 --- a/test/rekt/features/channel/features.go +++ b/test/rekt/features/channel/features.go @@ -487,6 +487,7 @@ func assertEnhancedWithKnativeErrorExtensions(sinkName string, matcherfns ...fun matchers[i] = fn(ctx) } _ = eventshub.StoreFromContext(ctx, sinkName).AssertExact( + ctx, t, 1, assert.MatchKind(eventshub.EventReceived), diff --git a/test/rekt/features/knconf/data_plane.go b/test/rekt/features/knconf/data_plane.go index b79f8b10f8c..13c82b3678e 100644 --- a/test/rekt/features/knconf/data_plane.go +++ b/test/rekt/features/knconf/data_plane.go @@ -54,7 +54,7 @@ func AcceptsCEVersions(ctx context.Context, t feature.T, gvr schema.GroupVersion // We are looking for two events, one of them is the sent event and the other // is Response, so correlate them first. We want to make sure the event was sent and that the // response was what was expected. - events := Correlate(store.AssertAtLeast(t, 2, SentEventMatcher(id))) + events := Correlate(store.AssertAtLeast(ctx, t, 2, SentEventMatcher(id))) for _, e := range events { // Make sure HTTP response code is 2XX if e.Response.StatusCode < 200 || e.Response.StatusCode > 299 {