Skip to content

Commit

Permalink
Minor edit
Browse files Browse the repository at this point in the history
  • Loading branch information
acumino committed Mar 3, 2022
1 parent beb43d9 commit e42ec8b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
4 changes: 3 additions & 1 deletion pkg/envtest/printer/prow.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ func AddReport(report ginkgo.Report, suiteName string) {
if os.Getenv("CI") != "" && artifactsDir != "" {
path := filepath.Join(artifactsDir, fmt.Sprintf("junit_%s_%d.xml", suiteName, report.SuiteConfig.ParallelProcess))
err := reporters.GenerateJUnitReport(report, path)
fmt.Printf("Failed to generate report\n\t%s", err.Error())
if err != nil {
fmt.Printf("Failed to generate report\n\t%s", err.Error())
}
}
}
18 changes: 9 additions & 9 deletions pkg/internal/controller/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ var _ = Describe("controller", func() {
}()

<-sourceSynced
}, 10.0)
})

It("should process events from source.Channel", func() {
// channel to be closed when event is processed
Expand Down Expand Up @@ -518,8 +518,8 @@ var _ = Describe("controller", func() {

By("Removing the item from the queue")
Eventually(queue.Len).Should(Equal(0))
Eventually(func() int { return queue.NumRequeues(request) }).Should(Equal(0))
}, 1.0)
Eventually(func() int { return queue.NumRequeues(request) }, 1.0).Should(Equal(0))
})

// TODO(directxman12): we should ensure that backoff occurrs with error requeue

Expand Down Expand Up @@ -695,7 +695,7 @@ var _ = Describe("controller", func() {
}
return nil
}, 2.0).Should(Succeed())
}, 2.0)
})

It("should get updated on reconcile errors", func() {
Expect(func() error {
Expand Down Expand Up @@ -724,7 +724,7 @@ var _ = Describe("controller", func() {
}
return nil
}, 2.0).Should(Succeed())
}, 2.0)
})

It("should get updated when reconcile returns with retry enabled", func() {
Expect(func() error {
Expand Down Expand Up @@ -754,7 +754,7 @@ var _ = Describe("controller", func() {
}
return nil
}, 2.0).Should(Succeed())
}, 2.0)
})

It("should get updated when reconcile returns with retryAfter enabled", func() {
Expect(func() error {
Expand Down Expand Up @@ -783,7 +783,7 @@ var _ = Describe("controller", func() {
}
return nil
}, 2.0).Should(Succeed())
}, 2.0)
})
})

Context("should update prometheus metrics", func() {
Expand Down Expand Up @@ -824,7 +824,7 @@ var _ = Describe("controller", func() {
By("Removing the item from the queue")
Eventually(queue.Len).Should(Equal(0))
Eventually(func() int { return queue.NumRequeues(request) }).Should(Equal(0))
}, 2.0)
})

It("should add a reconcile time to the reconcile time histogram", func() {
var reconcileTime dto.Metric
Expand Down Expand Up @@ -865,7 +865,7 @@ var _ = Describe("controller", func() {
}
return nil
}, 2.0).Should(Succeed())
}, 4.0)
})
})
})
})
Expand Down

0 comments on commit e42ec8b

Please sign in to comment.