mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-04-01 07:16:36 +00:00
mi: make timeout configurable for build functions (#2377)
This commit is contained in:
@@ -60,8 +60,10 @@ func FuncBenchmarkCollector[C collector.Collector](b *testing.B, name string, co
|
||||
}()
|
||||
|
||||
for b.Loop() {
|
||||
require.NoError(b, c.Collect(metrics))
|
||||
require.NoError(b, c.Collect(metrics, 0))
|
||||
}
|
||||
|
||||
require.NoError(b, collectors.Close())
|
||||
}
|
||||
|
||||
func TestCollector[C collector.Collector, V any](t *testing.T, fn func(*V) C, conf *V) {
|
||||
@@ -110,7 +112,7 @@ func TestCollector[C collector.Collector, V any](t *testing.T, fn func(*V) C, co
|
||||
|
||||
time.Sleep(1 * time.Second)
|
||||
|
||||
err = c.Collect(ch)
|
||||
err = c.Collect(ch, 0)
|
||||
|
||||
switch {
|
||||
// container collector
|
||||
|
||||
Reference in New Issue
Block a user