mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
fix the sleep logic
Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
This commit is contained in:
parent
457534d5c4
commit
da9da9fbee
|
@ -794,13 +794,13 @@ func TestCancelCompactions(t *testing.T) {
|
|||
dbClosed := make(chan struct{})
|
||||
for {
|
||||
if prom_testutil.ToFloat64(db.compactor.(*LeveledCompactor).metrics.populatingBlocks) > 0 {
|
||||
time.Sleep(3 * time.Millisecond)
|
||||
go func() {
|
||||
testutil.Ok(t, db.Close())
|
||||
close(dbClosed)
|
||||
}()
|
||||
break
|
||||
}
|
||||
time.Sleep(3 * time.Millisecond)
|
||||
}
|
||||
|
||||
start := time.Now()
|
||||
|
|
Loading…
Reference in a new issue