Skip to content

Commit

Permalink
Increase E2E test timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigonull committed Jan 11, 2024
1 parent ca5a493 commit 7d88809
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/e2e/workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ var _ = Describe("SonataFlow Operator", Ordered, func() {
}
return nil
}
EventuallyWithOffset(1, verifyControllerUp, time.Minute, time.Second).Should(Succeed())
EventuallyWithOffset(1, verifyControllerUp, 2*time.Minute, time.Second).Should(Succeed())
})

AfterAll(func() {
Expand All @@ -183,7 +183,7 @@ var _ = Describe("SonataFlow Operator", Ordered, func() {
"test/testdata/"+test.SonataFlowSimpleOpsYamlCR), "-n", namespace)
_, err := utils.Run(cmd)
return err
}, time.Minute, time.Second).Should(Succeed())
}, 2*time.Minute, time.Second).Should(Succeed())

By("check the workflow is in running state")
EventuallyWithOffset(1, func() bool { return verifyWorkflowIsInRunningState("simple") }, 15*time.Minute, 30*time.Second).Should(BeTrue())
Expand All @@ -193,7 +193,7 @@ var _ = Describe("SonataFlow Operator", Ordered, func() {
"test/testdata/"+test.SonataFlowSimpleOpsYamlCR), "-n", namespace)
_, err := utils.Run(cmd)
return err
}, time.Minute, time.Second).Should(Succeed())
}, 2*time.Minute, time.Second).Should(Succeed())
})

It("should successfully deploy the Greeting Workflow in prod mode and verify if it's running", func() {
Expand All @@ -203,15 +203,15 @@ var _ = Describe("SonataFlow Operator", Ordered, func() {
"test/testdata/"+test.SonataFlowGreetingsDataInputSchemaConfig), "-n", namespace)
_, err := utils.Run(cmd)
return err
}, time.Minute, time.Second).Should(Succeed())
}, 2*time.Minute, time.Second).Should(Succeed())

By("creating an instance of the SonataFlow Operand(CR)")
EventuallyWithOffset(1, func() error {
cmd := exec.Command("kubectl", "apply", "-f", filepath.Join(projectDir,
"test/testdata/"+test.SonataFlowGreetingsWithDataInputSchemaCR), "-n", namespace)
_, err := utils.Run(cmd)
return err
}, time.Minute, time.Second).Should(Succeed())
}, 2*time.Minute, time.Second).Should(Succeed())

By("check the workflow is in running state")
EventuallyWithOffset(1, func() bool { return verifyWorkflowIsInRunningState("greeting") }, 15*time.Minute, 30*time.Second).Should(BeTrue())
Expand All @@ -221,7 +221,7 @@ var _ = Describe("SonataFlow Operator", Ordered, func() {
"test/testdata/"+test.SonataFlowGreetingsWithDataInputSchemaCR), "-n", namespace)
_, err := utils.Run(cmd)
return err
}, time.Minute, time.Second).Should(Succeed())
}, 2*time.Minute, time.Second).Should(Succeed())
})

It("should successfully deploy the orderprocessing workflow in devmode and verify if it's running", func() {
Expand All @@ -232,25 +232,25 @@ var _ = Describe("SonataFlow Operator", Ordered, func() {
test.GetSonataFlowE2eOrderProcessingFolder()), "-n", namespace)
_, err := utils.Run(cmd)
return err
}, time.Minute, time.Second).Should(Succeed())
}, 2*time.Minute, time.Second).Should(Succeed())

By("check the workflow is in running state")
EventuallyWithOffset(1, func() bool { return verifyWorkflowIsInRunningState("orderprocessing") }, 5*time.Minute, 30*time.Second).Should(BeTrue())
EventuallyWithOffset(1, func() bool { return verifyWorkflowIsInRunningState("orderprocessing") }, 10*time.Minute, 30*time.Second).Should(BeTrue())

cmdLog := exec.Command("kubectl", "logs", "orderprocessing", "-n", namespace)
if responseLog, errLog := utils.Run(cmdLog); errLog == nil {
GinkgoWriter.Println(fmt.Sprintf("devmode podlog %s", responseLog))
}

By("check that the workflow is addressable")
EventuallyWithOffset(1, func() bool { return verifyWorkflowIsAddressable("orderprocessing") }, 5*time.Minute, 30*time.Second).Should(BeTrue())
EventuallyWithOffset(1, func() bool { return verifyWorkflowIsAddressable("orderprocessing") }, 10*time.Minute, 30*time.Second).Should(BeTrue())

EventuallyWithOffset(1, func() error {
cmd := exec.Command("kubectl", "delete", "-f", filepath.Join(projectDir,
test.GetSonataFlowE2eOrderProcessingFolder()), "-n", namespace)
_, err := utils.Run(cmd)
return err
}, time.Minute, time.Second).Should(Succeed())
}, 2*time.Minute, time.Second).Should(Succeed())
})
})
})
Expand Down

0 comments on commit 7d88809

Please sign in to comment.