Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
maschmid committed Jan 9, 2025
1 parent b6323cb commit 7844eae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
12 changes: 6 additions & 6 deletions test/rekt/features/broker_deleted_recreated.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
cetest "github.com/cloudevents/sdk-go/v2/test"
"github.com/google/uuid"
"k8s.io/apimachinery/pkg/types"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
kafkabroker "knative.dev/eventing-kafka-broker/control-plane/pkg/reconciler/broker"
"knative.dev/eventing-kafka-broker/test/e2e_new/bogus_config"
"knative.dev/eventing-kafka-broker/test/rekt/resources/kafkatopic"
Expand Down Expand Up @@ -83,7 +83,7 @@ func BrokerDeletedRecreated() *feature.Feature {
trigger.Install(
triggerName,
trigger.WithBrokerName(brokerName),
trigger.WithRetry(3, &backoffPolicy, pointer.String("PT1S")),
trigger.WithRetry(3, &backoffPolicy, ptr.To("PT1S")),
trigger.WithSubscriber(service.AsKReference(sink1), ""),
),
trigger.IsReady(triggerName),
Expand Down Expand Up @@ -111,7 +111,7 @@ func BrokerDeletedRecreated() *feature.Feature {
trigger.Install(
triggerName,
trigger.WithBrokerName(brokerName),
trigger.WithRetry(3, &backoffPolicy, pointer.String("PT1S")),
trigger.WithRetry(3, &backoffPolicy, ptr.To("PT1S")),
trigger.WithSubscriber(service.AsKReference(sink2), ""),
),
trigger.IsReady(triggerName),
Expand All @@ -121,9 +121,9 @@ func BrokerDeletedRecreated() *feature.Feature {
// therefore, we check that eventually, the last few events sent (16 for no particular reason) are all received by the sink2 only
// and contain an uninterrupted (without any missing sequence numbers) source sequence as sent by the source with eventshub.AddSequence
EventSequenceOnStores(sink1, sink2).
MatchingReceived(eventMatchers...). // ... when ...
OrderedBySourceSequence(). // ..., and taken the ...
LastN(16). // ... events, the sequence...
MatchingReceived(eventMatchers...). // ... when ...
OrderedBySourceSequence(). // ..., and taken the ...
LastN(16). // ... events, the sequence...
ContainsOnlyEventsObservedBy(sink2). // ...and...
IsAnUninterruptedSourceSequence().
Eventually(),
Expand Down
7 changes: 5 additions & 2 deletions test/rekt/features/sequence_assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,7 @@ func (b SequenceAssertionBuilder) Eventually() feature.StepFn {

var internalErr error

wait.PollImmediate(retryInterval, retryTimeout, func() (bool, error) {

err := wait.PollUntilContextTimeout(ctx, retryInterval, retryTimeout, true, func(ctx context.Context) (bool, error) {
events := make([]eventshub.EventInfo, 0)
for _, storeName := range b.storeNames {
store := eventshub.StoreFromContext(ctx, storeName)
Expand Down Expand Up @@ -244,5 +243,9 @@ func (b SequenceAssertionBuilder) Eventually() feature.StepFn {
if internalErr != nil {
t.Fatal(internalErr)
}

if err != nil {
t.Fatal(err)
}
}
}

0 comments on commit 7844eae

Please sign in to comment.