mi: make timeout configurable for build functions (#2377)

This commit is contained in:
Jan-Otto Kröpke
2026-03-30 18:32:58 +02:00
committed by GitHub
parent 792ef67c4e
commit 43f83573ef
75 changed files with 322 additions and 143 deletions

View File

@@ -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