Skip to content

Commit

Permalink
fix: timeout setting
Browse files Browse the repository at this point in the history
  • Loading branch information
myzhan committed Sep 13, 2023
1 parent e54c24a commit 67d96b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,6 @@ var _ = Describe("Test states", func() {
error: "500 error",
}

Eventually(newStats.messageToRunnerChan, slaveReportInterval+500*time.Millisecond).Should(Receive())
Eventually(newStats.messageToRunnerChan).WithTimeout(slaveReportInterval + 500*time.Millisecond).Should(Receive())
})
})
4 changes: 2 additions & 2 deletions utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var _ = Describe("Test utils", func() {

err := StartMemoryProfile("mem.pprof", 2*time.Second)
Expect(err).NotTo(HaveOccurred())
Eventually("mem.pprof", 3*time.Second).Should(BeAnExistingFile())
Eventually("mem.pprof").WithTimeout(3 * time.Second).Should(BeAnExistingFile())
})

It("test start CPU profile", func() {
Expand All @@ -64,6 +64,6 @@ var _ = Describe("Test utils", func() {

err := StartCPUProfile("cpu.pprof", 2*time.Second)
Expect(err).NotTo(HaveOccurred())
Eventually("cpu.pprof", 3*time.Second).Should(BeAnExistingFile())
Eventually("cpu.pprof").WithTimeout(3 * time.Second).Should(BeAnExistingFile())
})
})

0 comments on commit 67d96b2

Please sign in to comment.