@@ -533,16 +533,7 @@ var _ = Describe("controller", func() {
533
533
534
534
Context ("should update prometheus metrics" , func () {
535
535
It ("should requeue a Request if there is an error and continue processing items" , func (done Done ) {
536
- var queueLength , reconcileErrs dto.Metric
537
- ctrlmetrics .QueueLength .Reset ()
538
- Expect (func () error {
539
- ctrlmetrics .QueueLength .WithLabelValues (ctrl .Name ).Write (& queueLength )
540
- if queueLength .GetGauge ().GetValue () != 0.0 {
541
- return fmt .Errorf ("metric queue length not reset" )
542
- }
543
- return nil
544
- }()).Should (Succeed ())
545
-
536
+ var reconcileErrs dto.Metric
546
537
ctrlmetrics .ReconcileErrors .Reset ()
547
538
Expect (func () error {
548
539
ctrlmetrics .ReconcileErrors .WithLabelValues (ctrl .Name ).Write (& reconcileErrs )
@@ -564,13 +555,6 @@ var _ = Describe("controller", func() {
564
555
565
556
By ("Invoking Reconciler which will give an error" )
566
557
Expect (<- reconciled ).To (Equal (request ))
567
- Eventually (func () error {
568
- ctrlmetrics .QueueLength .WithLabelValues (ctrl .Name ).Write (& queueLength )
569
- if queueLength .GetGauge ().GetValue () != 1.0 {
570
- return fmt .Errorf ("metric queue length not updated" )
571
- }
572
- return nil
573
- }, 2.0 ).Should (Succeed ())
574
558
Eventually (func () error {
575
559
ctrlmetrics .ReconcileErrors .WithLabelValues (ctrl .Name ).Write (& reconcileErrs )
576
560
if reconcileErrs .GetCounter ().GetValue () != 1.0 {
0 commit comments