camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From souciance <souciance.eqdam.ras...@gmail.com>
Subject Re: Issues running unit tests based on CamelTestSupport
Date Wed, 29 Mar 2017 19:31:40 GMT
I am not sure seems to indicate that it it cannot find the junit rule
called TestWatcher. I don't think this is Camel related. I run those tests
with Junit and various rules and works fine. Seem if that rule is added to
your dependency.

On Wed, Mar 29, 2017 at 9:07 PM, KARR, DAVID [via Camel] <
ml-node+s465427n5796711h4@n5.nabble.com> wrote:

> I have only used Camel peripherally before.  I'm trying to get some unit
> tests working that are based on CamelTestSupport.  When I run "mvn install"
> from the command line, the tests attempt to execute, but I get errors like
> this:
>
> -------------------
> [ERROR] Failed to execute goal org.apache.maven.plugins:
> maven-surefire-plugin:2.19.1:test (default-test) on project ...:
> Execution default-test of goal org.apache.maven.plugins:
> maven-surefire-plugin:2.19.1:test failed: There was an error in the
> forked process
> [ERROR] java.lang.NoClassDefFoundError: org/junit/rules/TestWatcher
> [ERROR] at java.lang.ClassLoader.defineClass1(Native Method)
> [ERROR] at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
> [ERROR] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>
> [ERROR] at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
> [ERROR] at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
> [ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
> [ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
> [ERROR] at java.security.AccessController.doPrivileged(Native Method)
> [ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
> [ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> [ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
> [ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> [ERROR] at java.lang.Class.getDeclaredMethods0(Native Method)
> [ERROR] at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
> [ERROR] at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
> [ERROR] at java.lang.Class.getMethod0(Class.java:3018)
> [ERROR] at java.lang.Class.privateGetMethodRecursive(Class.java:3058)
> [ERROR] at java.lang.Class.getMethod0(Class.java:3018)
> [ERROR] at java.lang.Class.getMethod(Class.java:1784)
> [ERROR] at org.apache.maven.surefire.util.ReflectionUtils.
> tryGetMethod(ReflectionUtils.java:61)
> -----------------
>
> I've verified that this class is in the junit artifact, which is set as a
> dependency in the module (test scope).  Is there something funky about how
> Camel tests execute that are not obvious to me?
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Issues-running-unit-tests-
> based-on-CamelTestSupport-tp5796711.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428h31@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/Issues-running-unit-tests-based-on-CamelTestSupport-tp5796711p5796712.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message