Skip to content

Commit

Permalink
kie-issues#755 - Increase E2E tests timeouts (#349)
Browse files Browse the repository at this point in the history
* Increase E2E test timeouts

* Increase E2E test timeout
  • Loading branch information
rodrigonull authored Jan 12, 2024
1 parent 039efc3 commit 1972557
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ generate-all: generate generate-deploy bundle addheaders vet fmt

.PHONY: test-e2e # You will need to have a Minikube/Kind cluster up in running to run this target, and run container-builder before the test
test-e2e: install-operator-sdk
go test ./test/e2e/* -v -ginkgo.v
go test ./test/e2e/* -v -ginkgo.v -timeout 30m

.PHONY: before-pr
before-pr: test generate-all
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 1972557

Please sign in to comment.