[camel] branch master updated: CAMEL-14878: Added unit test
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 702dad5 CAMEL-14878: Added unit test 702dad5 is described below commit 702dad5d94c64ad299f12f6f460a43d942c1fb19 Author: Claus Ibsen AuthorDate: Sat May 23 08:44:35 2020 +0200 CAMEL-14878: Added unit test --- .../component/timer/TimerDelaySecondsTest.java | 47 ++ 1 file changed, 47 insertions(+) diff --git a/core/camel-core/src/test/java/org/apache/camel/component/timer/TimerDelaySecondsTest.java b/core/camel-core/src/test/java/org/apache/camel/component/timer/TimerDelaySecondsTest.java new file mode 100644 index 000..f157db8 --- /dev/null +++ b/core/camel-core/src/test/java/org/apache/camel/component/timer/TimerDelaySecondsTest.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.timer; + +import org.apache.camel.ContextTestSupport; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.mock.MockEndpoint; +import org.junit.Ignore; +import org.junit.Test; + +// TODO: https://issues.apache.org/jira/browse/CAMEL-14878 +@Ignore +public class TimerDelaySecondsTest extends ContextTestSupport { + +@Test +public void testDelay() throws Exception { +MockEndpoint mock = getMockEndpoint("mock:result"); +mock.expectedMinimumMessageCount(1); + +assertMockEndpointsSatisfied(); +} + +@Override +protected RouteBuilder createRouteBuilder() throws Exception { +return new RouteBuilder() { +@Override +public void configure() throws Exception { +from("timer://foo?delay=1s").to("mock:result"); + +} +}; +} +}
[camel] branch master updated: CAMEL-14878 : Add extended syntax for durations
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new f2a8027 CAMEL-14878 : Add extended syntax for durations f2a8027 is described below commit f2a80275a92d22f8fb86e4982de4e06a0bf9383f Author: Claus Ibsen AuthorDate: Sat May 23 08:14:06 2020 +0200 CAMEL-14878 : Add extended syntax for durations --- .../microprofile/faulttolerance/FaultToleranceManagementTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/camel-microprofile-fault-tolerance/src/test/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceManagementTest.java b/components/camel-microprofile-fault-tolerance/src/test/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceManagementTest.java index 5a3a331..75682e3 100644 --- a/components/camel-microprofile-fault-tolerance/src/test/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceManagementTest.java +++ b/components/camel-microprofile-fault-tolerance/src/test/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceManagementTest.java @@ -57,7 +57,7 @@ public class FaultToleranceManagementTest extends CamelTestSupport { assertEquals("start", routeId); Long num = (Long)mbeanServer.getAttribute(on, "Delay"); -assertEquals("5", num.toString()); +assertEquals("5000", num.toString()); } @Override
[camel] branch master updated: Camel 14878
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 5868585 Camel 14878 5868585 is described below commit 586858578d8f88a0e1a43865516192bca2331df0 Author: Claus Ibsen AuthorDate: Thu May 21 08:43:42 2020 +0200 Camel 14878 --- docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_2.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_2.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_2.adoc index 0a1645e..edd8bc7 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_2.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_2.adoc @@ -485,6 +485,8 @@ out of `camel-core-engine` into separate JAR named `camel-cluster`. === Configuring milli seconds +NOTE: If upgrading to Camel 3.4 or newer then do NOT do this because Camel 3.4 adds back support for this. + Camel was using a type converter from `String` -> `long` that accepted a time pattern which allowed to configure long values such as `2s` for 2 seconds, e.g. `2000`. And more complex such as `8h15m` for 8 hours and 15 minutes.