Skip to content

Commit 25bdcc8

Browse files
committed
acceptance_test: Use Ginkgo v2 WithTimeout
In Ginkgo v1 Eventually() took a timeout arg, in v2 WithTimeout must be used.
1 parent b262602 commit 25bdcc8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

acceptance_test/main_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,9 @@ var _ = AfterSuite(func() {
109109
var _ = Describe("BOSH Windows", func() {
110110
It("can run a job that relies on a package", func() {
111111
time.Sleep(60 * time.Second)
112-
Eventually(downloadLogs("check-multiple", "simple-job", 0, boshCommand),
113-
time.Second*65).Should(gbytes.Say("60 seconds passed"))
112+
Eventually(
113+
downloadLogs("check-multiple", "simple-job", 0, boshCommand),
114+
).WithTimeout(time.Second * 65).Should(gbytes.Say("60 seconds passed"))
114115
})
115116

116117
It("successfully runs redeploy in a tight loop", func() {
@@ -239,7 +240,7 @@ func fetchStemcellInfo(stemcellPath string) (StemcellYML, error) {
239240
cmd := exec.Command("tar", "xf", stemcellPath, "-C", tempDir, "stemcell.MF")
240241
session, err := gexec.Start(cmd, GinkgoWriter, GinkgoWriter)
241242
Expect(err).NotTo(HaveOccurred())
242-
Eventually(session, 20*time.Minute).Should(gexec.Exit())
243+
Eventually(session).WithTimeout(20 * time.Minute).Should(gexec.Exit())
243244

244245
exitCode := session.ExitCode()
245246
if exitCode != 0 {
@@ -344,7 +345,7 @@ func (c *BoshCommand) RunInStdOut(command, dir string) ([]byte, error) {
344345
if err != nil {
345346
return nil, err
346347
}
347-
Eventually(session, c.Timeout).Should(gexec.Exit())
348+
Eventually(session).WithTimeout(c.Timeout).Should(gexec.Exit())
348349

349350
exitCode := session.ExitCode()
350351
stdout := session.Out.Contents()

0 commit comments

Comments
 (0)