You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/02/17 18:08:20 UTC
[camel] branch main updated (731f6dfd754 -> de990047ece)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
from 731f6dfd754 Regen for commit 0fad6a84fdd8a63d9ac522ed32131ef4b8300c5b
new 4eaa87f8c90 camel-yaml-dsl - Added unit test
new de990047ece camel-core - Fix backlog tracer captuing source location for route input
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../camel/impl/engine/CamelInternalProcessor.java | 4 +++-
.../yaml/{LogTest.groovy => LocationTest.groovy} | 24 ++++++++++++----------
2 files changed, 16 insertions(+), 12 deletions(-)
copy dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/{LogTest.groovy => LocationTest.groovy} (74%)
[camel] 01/02: camel-yaml-dsl - Added unit test
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 4eaa87f8c90174388971ed275a2520ce082d9b72
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Feb 17 18:52:12 2023 +0100
camel-yaml-dsl - Added unit test
---
.../org/apache/camel/dsl/yaml/LocationTest.groovy | 47 ++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/LocationTest.groovy b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/LocationTest.groovy
new file mode 100644
index 00000000000..bb8de2b836e
--- /dev/null
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/LocationTest.groovy
@@ -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.dsl.yaml
+
+import org.apache.camel.dsl.yaml.support.YamlTestSupport
+import org.apache.camel.model.FromDefinition
+import org.apache.camel.model.LogDefinition
+
+class LocationTest extends YamlTestSupport {
+
+ def "location"() {
+ when:
+ loadRoutes '''
+ - from:
+ uri: "direct:start"
+ steps:
+ - log: "${body}"
+ '''
+ then:
+ context.routeDefinitions.size() == 1
+
+ with(context.routeDefinitions[0].input, FromDefinition) {
+ location == "route-0.yaml"
+ lineNumber == 2
+ }
+
+ with(context.routeDefinitions[0].outputs[0], LogDefinition) {
+ location == "route-0.yaml"
+ lineNumber == 5
+ }
+ }
+
+}
[camel] 02/02: camel-core - Fix backlog tracer captuing source location for route input
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit de990047ecefeed3ad6a7e613a9b48613295cd1a
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Feb 17 19:08:00 2023 +0100
camel-core - Fix backlog tracer captuing source location for route input
---
.../java/org/apache/camel/impl/engine/CamelInternalProcessor.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java
index 6fc1722509d..b2e43365735 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java
@@ -594,8 +594,9 @@ public class CamelInternalProcessor extends DelegateAsyncProcessor implements In
// if first we should add a pseudo trace message as well, so we have a starting message (eg from the route)
String routeId = routeDefinition != null ? routeDefinition.getRouteId() : null;
- String source = LoggerHelper.getLineNumberLoggerName(processorDefinition);
if (first) {
+ // use route as pseudo source when first
+ String source = LoggerHelper.getLineNumberLoggerName(routeDefinition);
long created = exchange.getCreated();
DefaultBacklogTracerEventMessage pseudoFirst = new DefaultBacklogTracerEventMessage(
true, false, backlogTracer.incrementTraceCounter(), created, source, routeId, null, exchangeId,
@@ -631,6 +632,7 @@ public class CamelInternalProcessor extends DelegateAsyncProcessor implements In
}
});
}
+ String source = LoggerHelper.getLineNumberLoggerName(processorDefinition);
DefaultBacklogTracerEventMessage event = new DefaultBacklogTracerEventMessage(
false, false, backlogTracer.incrementTraceCounter(), timestamp, source, routeId, toNode, exchangeId,
messageAsXml,