Skip to content

Commit

Permalink
kso-issue-376: Increase timeouts for each spec
Browse files Browse the repository at this point in the history
  • Loading branch information
domhanak committed Feb 7, 2024
1 parent 8ca27a3 commit 1c3c56c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion test/e2e/platform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ var _ = Describe("Validate the persistence", Ordered, func() {
Expect(sf).NotTo(BeEmpty(), "sonataflow name is empty")
EventuallyWithOffset(1, func() bool {
return verifyWorkflowIsInRunningStateInNamespace(sf, targetNamespace)
}, 5*time.Minute, 5).Should(BeTrue())
},10*time.Minute, 5).Should(BeTrue())
}
},
Entry("with both Job Service and Data Index and ephemeral persistence and the workflow in a dev profile", test.GetSonataFlowE2EPlatformServicesDirectory(), dev, ephemeral),
Expand Down
18 changes: 9 additions & 9 deletions test/e2e/workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ var _ = Describe("SonataFlow Operator", Ordered, func() {
"test/testdata/"+test.SonataFlowSimpleOpsYamlCR), "-n", targetNamespace)
_, err := utils.Run(cmd)
return err
}, 2*time.Minute, time.Second).Should(Succeed())
}, 3*time.Minute, time.Second).Should(Succeed())

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

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

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

By("check the workflow is in running state")
EventuallyWithOffset(1, func() bool { return verifyWorkflowIsInRunningState("orderprocessing", targetNamespace) }, 10*time.Minute, 30*time.Second).Should(BeTrue())
Expand All @@ -135,7 +135,7 @@ var _ = Describe("SonataFlow Operator", Ordered, func() {
test.GetSonataFlowE2eOrderProcessingFolder()), "-n", targetNamespace)
_, err := utils.Run(cmd)
return err
}, 2*time.Minute, time.Second).Should(Succeed())
}, 3*time.Minute, time.Second).Should(Succeed())
})

})
Expand Down Expand Up @@ -184,7 +184,7 @@ var _ = Describe("Validate the persistence ", Ordered, func() {
out, err := utils.Run(cmd)
GinkgoWriter.Printf("%s\n", string(out))
return err
}, 10*time.Minute, 5).Should(Succeed())
}, 12*time.Minute, 5).Should(Succeed())

By("Evaluate status of the workflow's pod database connection health endpoint")
cmd = exec.Command("kubectl", "get", "pod", "-l", "sonataflow.org/workflow-app=callbackstatetimeouts", "-n", ns, "-ojsonpath={.items[*].metadata.name}")
Expand All @@ -205,7 +205,7 @@ var _ = Describe("Validate the persistence ", Ordered, func() {
}
}
return false
}, 10*time.Minute).Should(BeTrue())
}, 12*time.Minute).Should(BeTrue())
},
Entry("defined in the workflow from an existing kubernetes service as a reference", test.GetSonataFlowE2EWorkflowPersistenceSampleDataDirectory("by_service")),
)
Expand Down

0 comments on commit 1c3c56c

Please sign in to comment.