mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
feat(scheduler): gracefully shutdown (#1951)
wait for workers to finish before exiting should fix tests reporting they couldn't remove rootDir because it's being written by tasks Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
@@ -1883,9 +1883,6 @@ func TestConfigReloader(t *testing.T) {
|
||||
destConfig.Log.Output = logFile.Name()
|
||||
|
||||
dctlr := api.NewController(destConfig)
|
||||
dcm := test.NewControllerManager(dctlr)
|
||||
|
||||
defer dcm.StopServer()
|
||||
|
||||
//nolint: dupl
|
||||
Convey("Reload config without sync", func() {
|
||||
@@ -1927,6 +1924,8 @@ func TestConfigReloader(t *testing.T) {
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
}
|
||||
|
||||
defer dctlr.Shutdown()
|
||||
|
||||
// let it sync
|
||||
time.Sleep(3 * time.Second)
|
||||
|
||||
@@ -2075,6 +2074,8 @@ func TestConfigReloader(t *testing.T) {
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
}
|
||||
|
||||
defer dctlr.Shutdown()
|
||||
|
||||
// let it sync
|
||||
time.Sleep(3 * time.Second)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user