Timer is more suitable for timeout race

This commit is contained in:
Frederik Ring 2024-01-27 21:07:04 +01:00
parent 542d1fa69f
commit 409496af24

View File

@ -43,7 +43,7 @@ func scaleService(cli *client.Client, serviceID string, replicas uint64) ([]stri
func awaitContainerCountForService(cli *client.Client, serviceID string, count int) error { func awaitContainerCountForService(cli *client.Client, serviceID string, count int) error {
poll := time.NewTicker(time.Second) poll := time.NewTicker(time.Second)
timeout := time.NewTicker(5 * time.Minute) timeout := time.NewTimer(5 * time.Minute)
defer timeout.Stop() defer timeout.Stop()
defer poll.Stop() defer poll.Stop()