camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: Camel route coverage maven fixed to skip certain inlined onException etc.
Date Sat, 14 Oct 2017 17:02:14 GMT
Repository: camel
Updated Branches:
  refs/heads/master bfffd714a -> e436d7f16


Camel route coverage maven fixed to skip certain inlined onException etc.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e436d7f1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e436d7f1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e436d7f1

Branch: refs/heads/master
Commit: e436d7f169097dcf65bbdaa66867f9fac70c85e9
Parents: bfffd71
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat Oct 14 19:02:02 2017 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sat Oct 14 19:02:02 2017 +0200

----------------------------------------------------------------------
 .../org/apache/camel/parser/helper/RouteCoverageHelper.java | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e436d7f1/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/RouteCoverageHelper.java
----------------------------------------------------------------------
diff --git a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/RouteCoverageHelper.java
b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/RouteCoverageHelper.java
index 45c61ed..09692f7 100644
--- a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/RouteCoverageHelper.java
+++ b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/RouteCoverageHelper.java
@@ -127,6 +127,15 @@ public final class RouteCoverageHelper {
             return;
         }
 
+        // inlined error handler, on completion etc should be skipped (and currently not
supported in route coverage)
+        boolean skip = "onException".equals(key) || "onCompletion".equals(key)
+            || "intercept".equals(key) || "interceptFrom".equals(key) || "interceptSendToEndpoint".equals(key)
+            || "policy".equals(key) || "transacted".equals(key);
+
+        if (skip) {
+            return;
+        }
+
         // only calculate for elements within the route
         if (!"route".equals(key)) {
             Integer count = 0;


Mime
View raw message