Skip to content

Commit

Permalink
chore(ztest/timeout): capture original scale after err handling (#1138)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashamelentyev authored Jul 25, 2022
1 parent 11a750e commit 4cfaabd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/ztest/timeout.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
Expand Down

0 comments on commit 4cfaabd

Please sign in to comment.