mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-10 07:34:04 -08:00
Merge pull request #1341 from prometheus/beorn7/storage2
Remove a race condition from TestRetentionCutoff
This commit is contained in:
commit
2f108452fc
|
@ -377,7 +377,10 @@ func TestRetentionCutoff(t *testing.T) {
|
|||
defer closer.Close()
|
||||
|
||||
// Stop maintenance loop to prevent actual purging.
|
||||
s.loopStopping <- struct{}{}
|
||||
close(s.loopStopping)
|
||||
<-s.loopStopped
|
||||
// Recreate channel to avoid panic when we really shut down.
|
||||
s.loopStopping = make(chan struct{})
|
||||
|
||||
s.dropAfter = 1 * time.Hour
|
||||
|
||||
|
|
Loading…
Reference in a new issue