mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
race in Triton SD Test (#3885)
This commit is contained in:
parent
7af69ad988
commit
4fa7e719f4
|
@ -86,7 +86,11 @@ func TestTritonSDRun(t *testing.T) {
|
||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
assert.NotNil(t, td)
|
assert.NotNil(t, td)
|
||||||
|
|
||||||
go td.Run(ctx, ch)
|
wait := make(chan struct{})
|
||||||
|
go func() {
|
||||||
|
td.Run(ctx, ch)
|
||||||
|
close(wait)
|
||||||
|
}()
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-time.After(60 * time.Millisecond):
|
case <-time.After(60 * time.Millisecond):
|
||||||
|
@ -96,6 +100,7 @@ func TestTritonSDRun(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
cancel()
|
cancel()
|
||||||
|
<-wait
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestTritonSDRefreshNoTargets(t *testing.T) {
|
func TestTritonSDRefreshNoTargets(t *testing.T) {
|
||||||
|
|
Loading…
Reference in a new issue