diff --git a/scrape/scrape_test.go b/scrape/scrape_test.go index 9e49fe8ef..04fd53601 100644 --- a/scrape/scrape_test.go +++ b/scrape/scrape_test.go @@ -3773,7 +3773,9 @@ func TestNativeHistogramMaxSchemaSet(t *testing.T) { }, } for name, tc := range testcases { + tc := tc t.Run(name, func(t *testing.T) { + t.Parallel() testNativeHistogramMaxSchemaSet(t, tc.minBucketFactor, tc.expectedSchema) }) } @@ -3816,8 +3818,8 @@ func testNativeHistogramMaxSchemaSet(t *testing.T, minBucketFactor string, expec configStr := fmt.Sprintf(` global: metric_name_validation_scheme: legacy - scrape_interval: 1s - scrape_timeout: 1s + scrape_interval: 50ms + scrape_timeout: 25ms scrape_configs: - job_name: test %s @@ -3830,7 +3832,7 @@ scrape_configs: s.DB.EnableNativeHistograms() reg := prometheus.NewRegistry() - mng, err := NewManager(&Options{EnableNativeHistogramsIngestion: true}, nil, nil, s, reg) + mng, err := NewManager(&Options{DiscoveryReloadInterval: model.Duration(10 * time.Millisecond), EnableNativeHistogramsIngestion: true}, nil, nil, s, reg) require.NoError(t, err) cfg, err := config.Load(configStr, false, log.NewNopLogger()) require.NoError(t, err) @@ -3861,7 +3863,7 @@ scrape_configs: countSeries++ } return countSeries > 0 - }, 15*time.Second, 100*time.Millisecond) + }, 5*time.Second, 100*time.Millisecond) // Check that native histogram schema is as expected. q, err := s.Querier(0, math.MaxInt64)