[ 
https://issues.apache.org/jira/browse/CAMEL-12993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16718603#comment-16718603
 ] 

ASF GitHub Bot commented on CAMEL-12993:
----------------------------------------

oscerd closed pull request #2667: CAMEL-12993: Have more informative message 
from springboot itests exc…
URL: https://github.com/apache/camel/pull/2667
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/ArquillianPackager.java
 
b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/ArquillianPackager.java
index 2e043d8880b..788efe5b3d4 100644
--- 
a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/ArquillianPackager.java
+++ 
b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/ArquillianPackager.java
@@ -41,6 +41,7 @@
 import org.apache.camel.itest.springboot.arquillian.SpringBootZipExporterImpl;
 import org.apache.commons.io.IOUtils;
 import org.jboss.arquillian.container.se.api.ClassPath;
+import org.jboss.arquillian.core.spi.InvocationException;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.ArchivePath;
 import org.jboss.shrinkwrap.api.Configuration;
@@ -396,7 +397,7 @@ private static void lookForVersionMismatch(ITestConfig 
config, List<MavenResolve
         if (message.length() > 0) {
             String alert = "Library version mismatch found.\n" + message;
             if (FAIL_ON_RELATED_LIBRARY_MISMATCH) {
-                throw new RuntimeException(alert);
+                throw new InvocationException(new RuntimeException(alert));
             } else {
                 debug(alert);
             }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Have more informative message from springboot itests exceptions
> ---------------------------------------------------------------
>
>                 Key: CAMEL-12993
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12993
>             Project: Camel
>          Issue Type: Improvement
>          Components: tests
>    Affects Versions: 2.23.0
>            Reporter: Andrea Tarocchi
>            Assignee: Andrea Tarocchi
>            Priority: Major
>
> When I run a springboot integration test like:
> {code:bash}
> mvn clean test -Dtest=CamelJgroupsRaftTest
> {code}
> if something go wrong in dependency/classpath preparation I get a message 
> like:
> {code:bash}
> org.apache.camel.itest.springboot.CamelJgroupsRaftTest  Time elapsed: 76.079 
> sec  <<< ERROR!
> java.lang.RuntimeException: Could not invoke deployment method: public static 
> org.jboss.shrinkwrap.api.Archive 
> org.apache.camel.itest.springboot.CamelJgroupsRaftTest.createSpringBootPackage()
>  throws java.lang.Exception
>         at 
> org.apache.camel.itest.springboot.CamelJgroupsRaftTest.createSpringBootPackage(CamelJgroupsRaftTest.java:32)
> {code}
> I would like a message more like this:
> {code:bash}
> org.apache.camel.itest.springboot.CamelJgroupsRaftTest  Time elapsed: 70.174 
> sec  <<< ERROR!
> java.lang.RuntimeException: Could not invoke deployment method: public static 
> org.jboss.shrinkwrap.api.Archive 
> org.apache.camel.itest.springboot.CamelJgroupsRaftTest.createSpringBootPackage()
>  throws java.lang.Exception
>         at 
> org.apache.camel.itest.springboot.CamelJgroupsRaftTest.createSpringBootPackage(CamelJgroupsRaftTest.java:32)
> Caused by: java.lang.RuntimeException: 
> Library version mismatch found.
> Found mismatch for dependency org.jgroups:jgroups:
>  - org.jgroups:jgroups-raft:jar: --> 0.4.2.Final
>  - org.jgroups:jgroups:jar: --> 4.0.15.Final
>         at 
> org.apache.camel.itest.springboot.CamelJgroupsRaftTest.createSpringBootPackage(CamelJgroupsRaftTest.java:32)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to