Skip to content

Commit

Permalink
chore: add some test logging to the operator_metrics_test for trouble…
Browse files Browse the repository at this point in the history
…shooting
  • Loading branch information
lburgazzoli committed May 9, 2024
1 parent 1fd641a commit 46ec143
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions e2e/advanced/operator_metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ func TestMetrics(t *testing.T) {
platformErroredCount = *platformErrored.Histogram.SampleCount
}

t.Logf("duration metric (integration platform) platformReconciliations=%d, platformReconciledCount=%d, platformRequeuedCount=%d platformErroredCount=%d",
platformReconciliations, platformReconciledCount, platformRequeuedCount, platformErroredCount)

g.Expect(platformReconciliations).To(BeNumerically("==", platformReconciledCount+platformRequeuedCount+platformErroredCount))

// Count the number of Integration reconciliations
Expand Down Expand Up @@ -322,6 +325,9 @@ func TestMetrics(t *testing.T) {
integrationErroredCount = *integrationErrored.Histogram.SampleCount
}

t.Logf("duration metric (integration) integrationReconciliations=%d, integrationReconciledCount=%d, integrationRequeuedCount=%d integrationErroredCount=%d",
integrationReconciliations, integrationReconciledCount, integrationRequeuedCount, integrationErroredCount)

g.Expect(integrationReconciliations).To(BeNumerically("==", integrationReconciledCount+integrationRequeuedCount+integrationErroredCount))

// Count the number of IntegrationKit reconciliations
Expand Down Expand Up @@ -368,6 +374,9 @@ func TestMetrics(t *testing.T) {
integrationKitRequeuedCount = *integrationKitRequeued.Histogram.SampleCount
}

t.Logf("duration metric (integration kit) integrationKitReconciliations=%d, integrationKitReconciledCount=%d, integrationKitRequeuedCount=%d",
integrationKitReconciliations, integrationKitReconciledCount, integrationKitRequeuedCount)

g.Expect(integrationKitReconciliations).To(BeNumerically("==", integrationKitReconciledCount+integrationKitRequeuedCount))

// Count the number of Build reconciliations
Expand Down Expand Up @@ -411,6 +420,9 @@ func TestMetrics(t *testing.T) {
buildRequeuedCount = *buildRequeued.Histogram.SampleCount
}

t.Logf("duration metric (build) buildReconciliations=%d, buildReconciledCount=%d, buildRequeuedCount=%d",
buildReconciliations, buildReconciledCount, buildRequeuedCount)

g.Expect(buildReconciliations).To(BeNumerically("==", buildReconciledCount+buildRequeuedCount))
})

Expand Down

0 comments on commit 46ec143

Please sign in to comment.