Skip to content

Commit

Permalink
fix: increase acceptable time deviation for stop tests with -t
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Berning <[email protected]>
  • Loading branch information
sam-berning committed Sep 19, 2023
1 parent e1bacf3 commit 6fc2639
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"

"github.com/runfinch/common-tests/command"
"github.com/runfinch/common-tests/option"
)
Expand Down Expand Up @@ -41,7 +40,7 @@ func Stop(o *option.Option) {
gomega.Expect(command.StdoutStr(o, "exec", testContainerName, "echo", "foo")).To(gomega.Equal("foo"))
startTime := time.Now()
command.Run(o, "stop", "-t", "1", testContainerName)
gomega.Expect(time.Since(startTime)).To(gomega.BeNumerically("~", 1*time.Second, 500*time.Millisecond))
gomega.Expect(time.Since(startTime)).To(gomega.BeNumerically("~", 1*time.Second, 750*time.Millisecond))
command.RunWithoutSuccessfulExit(o, "exec", testContainerName, "echo", "foo")
})
}
Expand Down

0 comments on commit 6fc2639

Please sign in to comment.