Author: dkulp
Date: Tue May 8 13:54:51 2012
New Revision: 1335522
URL: http://svn.apache.org/viewvc?rev=1335522&view=rev
Log:
Fix jetty test failure with j7
Modified:
camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpAuthMethodPriorityTest.java
Modified:
camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpAuthMethodPriorityTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpAuthMethodPriorityTest.java?rev=1335522&r1=1335521&r2=1335522&view=diff
==============================================================================
---
camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpAuthMethodPriorityTest.java
(original)
+++
camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpAuthMethodPriorityTest.java
Tue May 8 13:54:51 2012
@@ -47,7 +47,6 @@ public class HttpAuthMethodPriorityTest
jndi.bind("myAuthHandler", getSecurityHandler());
return jndi;
}
-
private SecurityHandler getSecurityHandler() throws IOException {
Constraint constraint = new Constraint(Constraint.__BASIC_AUTH,
"user");
constraint.setAuthenticate(true);
@@ -86,7 +85,10 @@ public class HttpAuthMethodPriorityTest
fail("Should have thrown an exception");
} catch (FailedToCreateProducerException e) {
IllegalArgumentException cause =
assertIsInstanceOf(IllegalArgumentException.class,
e.getCause().getCause().getCause());
- assertEquals("No enum const class
org.apache.camel.component.http.AuthMethod.foo", cause.getMessage());
+ //JAXB 2.2 uses a slightly different message
+ boolean b = cause.getMessage().contains("No enum const")
+ &&
cause.getMessage().contains("org.apache.camel.component.http.AuthMethod.foo");
+ assertTrue("Bad fault message: " + cause.getMessage(), b);
}
}