jbufu / openid4java

Automatically exported from code.google.com/p/openid4java
Apache License 2.0
98 stars 58 forks source link

Test failure intermittently #215

Open cdwijayarathna opened 9 years ago

cdwijayarathna commented 9 years ago

We are getting following test failure intermittently, any idea on what is the cause for this?

T E S T S
Running org.openid4java.consumer.InMemoryNonceVerifierTest
[DEBUG] 04:51:57,996 [IncrementalNonceGenerator.java          :  46]                      : Generated nonce:        2015-09-08T23:21:57Z01441754517995
[DEBUG] 04:51:58,003 [AbstractNonceVerifier.java              :  43]                      : Verifying nonce: 2015-09-08T23:21:57Z01441754517995
[DEBUG] 04:51:58,010 [InternetDateFormat.java                 :  40]                      : Parsed 2015-09-08T23:21:57Z01441754517995 into Data object: Wed Sep 09 04:51:57 IST 2015
[WARN ] 04:51:58,012 [AbstractNonceVerifier.java              :  52]                      : Nonce is too old: 2015-09-08T23:21:57Z01441754517995
 [DEBUG] 04:51:58,020 [AbstractNonceVerifier.java              :  43]                      : Verifying nonce: 2015-09-08T23:21:58Zabc
[DEBUG] 04:51:58,021 [InternetDateFormat.java                 :  40]                      : Parsed 2015-09-08T23:21:58Zabc into Data object: Wed Sep 09 04:51:58 IST 2015
[DEBUG] 04:51:58,023 [InMemoryNonceVerifier.java              :  54]                      : Nonce verified: 2015-09-08T23:21:58Zabc
[DEBUG] 04:51:58,024 [AbstractNonceVerifier.java              :  43]                      : Verifying nonce: 2015-09-08T23:21:58Zabc
[DEBUG] 04:51:58,026 [InternetDateFormat.java                 :  40]                      : Parsed 2015-09-08T23:21:58Zabc into Data object: Wed Sep 09 04:51:58 IST 2015
[DEBUG] 04:51:58,028 [InternetDateFormat.java                 :  40]                      : Parsed 2015-09-08T23:21:58Zabc into Data object: Wed Sep 09 04:51:58 IST 2015
[ERROR] 04:51:58,029 [InMemoryNonceVerifier.java              :  47]                      : Possible replay attack! Already seen nonce: 2015-09-08T23:21:58Zabc
 [DEBUG] 04:51:58,030 [AbstractNonceVerifier.java              :  43]                      : Verifying nonce: 2015-09-08T23:21:58Zabc
[DEBUG] 04:51:58,031 [InternetDateFormat.java                 :  40]                      : Parsed 2015-09-08T23:21:58Zabc into Data object: Wed Sep 09 04:51:58 IST 2015
[DEBUG] 04:51:58,033 [InternetDateFormat.java                 :  40]                      : Parsed 2015-09-08T23:21:58Zabc into Data object: Wed Sep 09 04:51:58 IST 2015
[DEBUG] 04:51:58,034 [InMemoryNonceVerifier.java              :  54]                      : Nonce verified: 2015-09-08T23:21:58Zabc
[DEBUG] 04:51:58,035 [AbstractNonceVerifier.java              :  43]                      : Verifying nonce: xyz
[ERROR] 04:51:58,039 [AbstractNonceVerifier.java              :  58]                      : Error verifying the nonce: xyz
java.text.ParseException: Unparseable date: "XYZ"
        at java.text.DateFormat.parse(DateFormat.java:357)
    at org.openid4java.util.InternetDateFormat.parse(InternetDateFormat.java:37)
    at org.openid4java.consumer.AbstractNonceVerifier.seen(AbstractNonceVerifier.java:49)
    at org.openid4java.consumer.AbstractNonceVerifierTest.testMalformed(AbstractNonceVerifierTest.java:52)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at junit.framework.TestCase.runTest(TestCase.java:164)
    at junit.framework.TestCase.runBare(TestCase.java:130)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:120)
    at junit.framework.TestSuite.runTest(TestSuite.java:230)
    at junit.framework.TestSuite.run(TestSuite.java:225)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:99)
    at org.apache.maven.surefire.junit.JUnit3Provider.executeTestSet(JUnit3Provider.java:130)
    at org.apache.maven.surefire.junit.JUnit3Provider.invoke(JUnit3Provider.java:107)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[DEBUG] 04:51:58,043 [AbstractNonceVerifier.java              :  43]                      : Verifying nonce: 2015-09-08T23:20:57Zabc
[DEBUG] 04:51:58,044 [InternetDateFormat.java                 :  40]                      : Parsed 2015-09-08T23:20:57Zabc into Data object: Wed Sep 09 04:50:57 IST 2015
[WARN ] 04:51:58,045 [AbstractNonceVerifier.java              :  52]                      : Nonce is too old: 2015-09-08T23:20:57Zabc
Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.258 sec <<< FAILURE! - in org.openid4java.consumer.InMemoryNonceVerifierTest
testNonceCleanup(org.openid4java.consumer.InMemoryNonceVerifierTest)  Time elapsed: 0.029 sec  <<< FAILURE!
junit.framework.AssertionFailedError: expected:<0> but was:<3>
    at junit.framework.Assert.fail(Assert.java:47)
    at junit.framework.Assert.failNotEquals(Assert.java:280)
    at junit.framework.Assert.assertEquals(Assert.java:64)
    at junit.framework.Assert.assertEquals(Assert.java:198)
    at junit.framework.Assert.assertEquals(Assert.java:204)
    at org.openid4java.consumer.AbstractNonceVerifierTest.testNonceCleanup(AbstractNonceVerifierTest.java:68)
    at org.openid4java.consumer.InMemoryNonceVerifierTest.testNonceCleanup(InMemoryNonceVerifierTest.java:27)