From b94115c8993634260d374bdf223970afdcf7bc3a Mon Sep 17 00:00:00 2001 From: Sasha Melentyev Date: Sat, 23 Jul 2022 13:44:40 +0300 Subject: [PATCH] chore: move down original timeout scale after err handling --- internal/ztest/timeout.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ztest/timeout.go b/internal/ztest/timeout.go index f7d58f316..e4222f947 100644 --- a/internal/ztest/timeout.go +++ b/internal/ztest/timeout.go @@ -42,11 +42,11 @@ func Sleep(base time.Duration) { // Initialize checks the environment and alters the timeout scale accordingly. // It returns a function to undo the scaling. func Initialize(factor string) func() { - original := _timeoutScale fv, err := strconv.ParseFloat(factor, 64) if err != nil { panic(err) } + original := _timeoutScale _timeoutScale = fv return func() { _timeoutScale = original } }