You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2020/05/28 14:27:36 UTC
[camel-k] 04/04:
https://github.com/apache/camel-k-runtime/issues/224: refactor test to use
cron component
This is an automated email from the ASF dual-hosted git repository.
nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 09d1d7be52a09d4bd554825de618910e2acc8b98
Author: Nicola Ferraro <ni...@gmail.com>
AuthorDate: Thu May 28 15:15:17 2020 +0200
https://github.com/apache/camel-k-runtime/issues/224: refactor test to use cron component
---
e2e/common/cron_test.go | 13 +++++++++++++
e2e/common/files/cron-fallback.groovy | 3 +--
.../files/{cron-fallback.groovy => cron-quartz.groovy} | 1 -
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/e2e/common/cron_test.go b/e2e/common/cron_test.go
index d9c6f62..4a7d998 100644
--- a/e2e/common/cron_test.go
+++ b/e2e/common/cron_test.go
@@ -83,5 +83,18 @@ func TestRunCronExample(t *testing.T) {
Eventually(IntegrationLogs(ns, "cron-fallback-quarkus"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
Expect(Kamel("delete", "--all", "-n", ns).Execute()).Should(BeNil())
})
+
+ // Enable this test when https://github.com/apache/camel-k-runtime/issues/346 is fixed (Camel K Runtime 1.3.x)
+ /*
+ t.Run("cron-quartz-quarkus", func(t *testing.T) {
+ RegisterTestingT(t)
+
+ Expect(Kamel("run", "--name", "cron-quartz-quarkus", "-n", ns, "files/cron-quartz.groovy", "-t", "quarkus.enabled=true").Execute()).Should(BeNil())
+ Eventually(IntegrationPodPhase(ns, "cron-quartz-quarkus"), TestTimeoutMedium).Should(Equal(v1.PodRunning))
+ Eventually(IntegrationCondition(ns, "cron-quartz-quarkus", camelv1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(v1.ConditionTrue))
+ Eventually(IntegrationLogs(ns, "cron-quartz-quarkus"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
+ Expect(Kamel("delete", "--all", "-n", ns).Execute()).Should(BeNil())
+ })
+ */
})
}
diff --git a/e2e/common/files/cron-fallback.groovy b/e2e/common/files/cron-fallback.groovy
index 47980c5..ae2c5d9 100644
--- a/e2e/common/files/cron-fallback.groovy
+++ b/e2e/common/files/cron-fallback.groovy
@@ -15,8 +15,7 @@
* limitations under the License.
*/
-// TODO: replace the consumer URI with 'cron:tab?schedule=0/1+*+*+*+*+?' when camel-cron is available in Apache Camel
-from('quartz:trigger?cron=0/1+*+*+*+*+?')
+from('cron:tab?schedule=0/1+*+*+*+*+?')
.routeId('groovy')
.setHeader("m").constant("string!")
.setBody()
diff --git a/e2e/common/files/cron-fallback.groovy b/e2e/common/files/cron-quartz.groovy
similarity index 89%
copy from e2e/common/files/cron-fallback.groovy
copy to e2e/common/files/cron-quartz.groovy
index 47980c5..f1c41bb 100644
--- a/e2e/common/files/cron-fallback.groovy
+++ b/e2e/common/files/cron-quartz.groovy
@@ -15,7 +15,6 @@
* limitations under the License.
*/
-// TODO: replace the consumer URI with 'cron:tab?schedule=0/1+*+*+*+*+?' when camel-cron is available in Apache Camel
from('quartz:trigger?cron=0/1+*+*+*+*+?')
.routeId('groovy')
.setHeader("m").constant("string!")