Skip to content

Commit 7d96428

Browse files
committed
arjan review 3
1 parent c50e00c commit 7d96428

File tree

4 files changed

+132
-129
lines changed

4 files changed

+132
-129
lines changed

stats/opentelemetry/csm/observability_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ func (s) TestCSMPluginOptionUnary(t *testing.T) {
246246
opts := test.opts
247247
opts.Target = ss.Target
248248
wantMetrics := itestutils.MetricDataUnary(opts)
249-
itestutils.CompareMetrics(ctx, t, reader, gotMetrics, wantMetrics)
249+
gotMetrics = itestutils.WaitForServerMetrics(ctx, t, reader, gotMetrics, wantMetrics)
250+
itestutils.CompareMetrics(t, gotMetrics, wantMetrics)
250251
})
251252
}
252253
}
@@ -419,7 +420,8 @@ func (s) TestCSMPluginOptionStreaming(t *testing.T) {
419420
opts := test.opts
420421
opts.Target = ss.Target
421422
wantMetrics := itestutils.MetricDataStreaming(opts)
422-
itestutils.CompareMetrics(ctx, t, reader, gotMetrics, wantMetrics)
423+
gotMetrics = itestutils.WaitForServerMetrics(ctx, t, reader, gotMetrics, wantMetrics)
424+
itestutils.CompareMetrics(t, gotMetrics, wantMetrics)
423425
})
424426
}
425427
}
@@ -603,7 +605,8 @@ func (s) TestXDSLabels(t *testing.T) {
603605
},
604606
}
605607

606-
itestutils.CompareMetrics(ctx, t, reader, gotMetrics, wantMetrics)
608+
gotMetrics = itestutils.WaitForServerMetrics(ctx, t, reader, gotMetrics, wantMetrics)
609+
itestutils.CompareMetrics(t, gotMetrics, wantMetrics)
607610
}
608611

609612
// TestObservability tests that Observability global function compiles and runs

0 commit comments

Comments
 (0)