diff --git a/scrape/manager_test.go b/scrape/manager_test.go index 675217e6f..c14d99796 100644 --- a/scrape/manager_test.go +++ b/scrape/manager_test.go @@ -919,7 +919,16 @@ func TestManagerCTZeroIngestion(t *testing.T) { require.Equal(t, tc.counterSampleProto.GetValue(), got[0]) case "application/openmetrics-text; version=1.0.0": + if tc.enableCTZeroIngestion && tc.exp.ts == 0 { + require.Len(t, got, 2) + require.Equal(t, tc.exp.value, got[1]) + require.Equal(t, 0.0, got[1]) + return + } + + // Expect only one, valid sample. require.Len(t, got, 1) + require.Equal(t, tc.exp.value, got[0]) } }) }