ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm O hEigeartaigh <cohei...@apache.org>
Subject Re: Test Failures in 2.0.2 Snapshoot : at org.apache.wss4j.stax.test.TimestampTest.testTimestampExpiredInbound(TimestampTest.java:203)
Date Wed, 09 Jul 2014 10:27:53 GMT
Could you try again with the latest code? I've merged some fixes for some
timing-based issues in the tests.

Colm.


On Wed, Jul 9, 2014 at 10:39 AM, Adrian Williamson <aw@octavo2.demon.co.uk>
wrote:

> Hi,
>
> I'm getting the error at the end of this note while running 'mvn -e
> package'.
>
> From this
>
> org.apache.wss4j.stax.test.TimestampTest.testTimestampExpiredInbound(Timesta
> mpTest.java:203) -
>
>        Thread.sleep(1000);
>
>         //done timestamp; now test timestamp-verification:
>         {
>             WSSSecurityProperties securityProperties = new
> WSSSecurityProperties();
>             InboundWSSec wsSecIn =
> WSSec.getInboundWSSec(securityProperties);
>             XMLStreamReader xmlStreamReader =
> wsSecIn.processInMessage(xmlInputFactory.createXMLStreamReader(new
> ByteArrayInputStream(baos.toByteArray())));
>
>             try {
>
> StAX2DOM.readDoc(documentBuilderFactory.newDocumentBuilder(),
> xmlStreamReader);
>                 Assert.fail("Expected XMLStreamException"); // line 203
>             } catch (XMLStreamException e) {
>                 Assert.assertNotNull(e.getCause());
>                 Assert.assertTrue(e.getCause() instanceof
> WSSecurityException);
>                 Assert.assertEquals(((WSSecurityException)
> e.getCause()).getFaultCode(), WSSecurityException.MESSAGE_EXPIRED);
>             }
>         }
>
> I tried to have a look at this, but it disappears into a world of Streams
> and WSS4J test configuration that is taking me some time to come to terms
> with.
>
> I believe the timestamps which it sets are done in :
>
> 183: Document securedDocument = doOutboundSecurityWithWSS4J(sourceDocument,
> action, outboundProperties);
>
> Which quickly ends up in AbstractTestBase.java
>
> Any hints appreciated.
>
> Adrian
>
> PS How can I look at / turn on the output from org.slf4j.Logger?
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ---------------- ERROR -------------------------------
>
> Running org.apache.wss4j.stax.test.TimestampTest
> Tests run: 15, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 4.515 sec
> <<< FAILURE! - in org.apache.wss4j.stax.test.TimestampTest
> testTimestampExpiredInbound(org.apache.wss4j.stax.test.TimestampTest)  Time
> elapsed: 1.063 sec  <<< FAILURE!
> java.lang.AssertionError: Expected XMLStreamException
>         at org.junit.Assert.fail(Assert.java:88)
>         at
>
> org.apache.wss4j.stax.test.TimestampTest.testTimestampExpiredInbound(Timesta
> mpTest.java:203)
>
> testTimestampTTLInbound(org.apache.wss4j.stax.test.TimestampTest)  Time
> elapsed: 1.016 sec  <<< FAILURE!
> java.lang.AssertionError: Expected XMLStreamException
>         at org.junit.Assert.fail(Assert.java:88)
>         at
>
> org.apache.wss4j.stax.test.TimestampTest.testTimestampTTLInbound(TimestampTe
> st.java:422)
>
> testTimestampTTLOutbound(org.apache.wss4j.stax.test.TimestampTest)  Time
> elapsed: 0 sec  <<< FAILURE!
> java.lang.AssertionError: null
>         at org.junit.Assert.fail(Assert.java:86)
>         at org.junit.Assert.assertTrue(Assert.java:41)
>         at org.junit.Assert.assertTrue(Assert.java:52)
>         at
>
> org.apache.wss4j.stax.test.TimestampTest.testTimestampTTLOutbound(TimestampT
> est.java:160)
>
>
> testTimestampDefaultConfigurationOutbound(org.apache.wss4j.stax.test.Timesta
> mpTest)  Time elapsed: 0 sec  <<< FAILURE!
> java.lang.AssertionError: null
>         at org.junit.Assert.fail(Assert.java:86)
>         at org.junit.Assert.assertTrue(Assert.java:41)
>         at org.junit.Assert.assertTrue(Assert.java:52)
>         at
>
> org.apache.wss4j.stax.test.TimestampTest.testTimestampDefaultConfigurationOu
> tbound(TimestampTest.java:83)
>
> Running org.apache.wss4j.stax.test.UsernameTokenTest
> Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.562 sec
> -
> in org.apache.wss4j.stax.test.UsernameTokenTest
> Running org.apache.wss4j.stax.test.VulnerabliltyVectorsTest
> testAllowMD5Algorithm skipped
> testAllowMD5Algorithm skipped
> testAllowMD5Algorithm skipped
> Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1 sec - in
> org.apache.wss4j.stax.test.VulnerabliltyVectorsTest
>
> Results :
>
> Failed tests:
>   TimestampTest.testTimestampExpiredInbound:203->Assert.fail:88 Expected
> XMLStreamException
>   TimestampTest.testTimestampTTLInbound:422->Assert.fail:88 Expected
> XMLStreamException
>
>
> TimestampTest.testTimestampTTLOutbound:160->Assert.assertTrue:52->Assert.ass
> ertTrue:41->Assert.fail:86 null
>
>
> TimestampTest.testTimestampDefaultConfigurationOutbound:83->Assert.assertTru
> e:52->Assert.assertTrue:41->Assert.fail:86 null
>
> Tests run: 353, Failures: 4, Errors: 0, Skipped: 3
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Apache WSS4J ...................................... SUCCESS [3.390s]
> [INFO] Apache WSS4J parent ............................... SUCCESS [0.360s]
> [INFO] Apache WSS4J WS-Security Bindings ................. SUCCESS [6.664s]
> [INFO] Apache WSS4J WS-SecurityPolicy model .............. SUCCESS [8.101s]
> [INFO] Apache WSS4J WS-Security Common ................... SUCCESS [8.203s]
> [INFO] Apache WSS4J DOM WS-Security ...................... SUCCESS
> [23.071s]
> [INFO] Apache WSS4J Streaming WS-Security ................ FAILURE
> [56.640s]
> [INFO] Apache WSS4J WS-Security Integration .............. SKIPPED
> [INFO] Apache WSS4J Streaming WS-SecurityPolicy .......... SKIPPED
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1:46.961s
> [INFO] Finished at: Wed Jul 09 10:27:26 BST 2014
> [INFO] Final Memory: 36M/426M
> [INFO]
> ------------------------------------------------------------------------
>
>


-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Mime
View raw message