mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
cmd/prometheus: wait for Prometheus to shutdown in tests
So temporary data directory can be successfully removed, as on Windows, directory cannot be in used while removal. Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
This commit is contained in:
parent
01c5582216
commit
c3beca72e2
|
@ -226,6 +226,7 @@ func TestWALSegmentSizeBounds(t *testing.T) {
|
||||||
t.Errorf("prometheus should be still running: %v", err)
|
t.Errorf("prometheus should be still running: %v", err)
|
||||||
case <-time.After(5 * time.Second):
|
case <-time.After(5 * time.Second):
|
||||||
prom.Process.Kill()
|
prom.Process.Kill()
|
||||||
|
<-done
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -268,6 +269,7 @@ func TestMaxBlockChunkSegmentSizeBounds(t *testing.T) {
|
||||||
t.Errorf("prometheus should be still running: %v", err)
|
t.Errorf("prometheus should be still running: %v", err)
|
||||||
case <-time.After(5 * time.Second):
|
case <-time.After(5 * time.Second):
|
||||||
prom.Process.Kill()
|
prom.Process.Kill()
|
||||||
|
<-done
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -438,6 +440,7 @@ func TestModeSpecificFlags(t *testing.T) {
|
||||||
t.Errorf("prometheus should be still running: %v", err)
|
t.Errorf("prometheus should be still running: %v", err)
|
||||||
case <-time.After(5 * time.Second):
|
case <-time.After(5 * time.Second):
|
||||||
prom.Process.Kill()
|
prom.Process.Kill()
|
||||||
|
<-done
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue