Skip to content

Commit 952c490

Browse files
committed
drop Requeue entirely
Signed-off-by: sivchari <[email protected]>
1 parent f109634 commit 952c490

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

internal/util/controller/controller_test.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ func TestReconcileMetrics(t *testing.T) {
185185
res, err = r.Reconcile(t.Context(), req)
186186
g.Expect(err).To(HaveOccurred())
187187
g.Expect(res.RequeueAfter).To(Equal(time.Duration(0)))
188-
g.Expect(res.Requeue).To(BeFalse()) //nolint:staticcheck // We have to handle Requeue until it is removed
189188
g.Expect(counterMetricValue(reconcileTotal.WithLabelValues(r.name, labelError))).To(Equal(1))
190189
g.Expect(counterMetricValue(reconcileTotal.WithLabelValues(r.name, labelRequeueAfter))).To(Equal(0))
191190
g.Expect(counterMetricValue(reconcileTotal.WithLabelValues(r.name, labelRequeue))).To(Equal(0))
@@ -199,26 +198,11 @@ func TestReconcileMetrics(t *testing.T) {
199198
res, err = r.Reconcile(t.Context(), req)
200199
g.Expect(err).ToNot(HaveOccurred())
201200
g.Expect(res.RequeueAfter).To(Equal(5 * time.Second))
202-
g.Expect(res.Requeue).To(BeFalse()) //nolint:staticcheck // We have to handle Requeue until it is removed
203201
g.Expect(counterMetricValue(reconcileTotal.WithLabelValues(r.name, labelError))).To(Equal(1))
204202
g.Expect(counterMetricValue(reconcileTotal.WithLabelValues(r.name, labelRequeueAfter))).To(Equal(1))
205203
g.Expect(counterMetricValue(reconcileTotal.WithLabelValues(r.name, labelRequeue))).To(Equal(0))
206204
g.Expect(counterMetricValue(reconcileTotal.WithLabelValues(r.name, labelSuccess))).To(Equal(1))
207205
g.Expect(histogramMetricValue(reconcileTime.WithLabelValues(r.name))).To(Equal(3))
208-
209-
// Requeue
210-
r.reconciler = reconcile.Func(func(_ context.Context, _ reconcile.Request) (reconcile.Result, error) {
211-
return reconcile.Result{Requeue: true}, nil
212-
})
213-
res, err = r.Reconcile(t.Context(), req)
214-
g.Expect(err).ToNot(HaveOccurred())
215-
g.Expect(res.RequeueAfter).To(Equal(time.Duration(0)))
216-
g.Expect(res.Requeue).To(BeTrue()) //nolint:staticcheck // We have to handle Requeue until it is removed
217-
g.Expect(counterMetricValue(reconcileTotal.WithLabelValues(r.name, labelError))).To(Equal(1))
218-
g.Expect(counterMetricValue(reconcileTotal.WithLabelValues(r.name, labelRequeueAfter))).To(Equal(1))
219-
g.Expect(counterMetricValue(reconcileTotal.WithLabelValues(r.name, labelRequeue))).To(Equal(1))
220-
g.Expect(counterMetricValue(reconcileTotal.WithLabelValues(r.name, labelSuccess))).To(Equal(1))
221-
g.Expect(histogramMetricValue(reconcileTime.WithLabelValues(r.name))).To(Equal(4))
222206
})
223207
}
224208

0 commit comments

Comments
 (0)