[
http://jira.amdatu.org/jira/browse/AMDATU-284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10845#comment-10845
]
Bram de Kruijff commented on AMDATU-284:
----------------------------------------
These tests do not seem to properly setup/teardown their storage. Both tests
use a default consumer implementation with the same (storage identifier). When
the tests are run subsequently in one integration test cycle the backing
storage is not cleaned and this causes the collision. This at least seems to
explain ConsumerAlreadyExistsException.
> Non deterministic itest failures for OAuth test
> -----------------------------------------------
>
> Key: AMDATU-284
> URL: http://jira.amdatu.org/jira/browse/AMDATU-284
> Project: Amdatu
> Issue Type: Bug
> Components: Amdatu Auth, Integration Tests
> Affects Versions: 0.1.0
> Reporter: Bram de Kruijff
> Priority: Blocker
>
> OAuth tests failing regulaly in the dispatcer branch and I'm lost. Is did a
> few tweaks to prevent non-asserted NPE's in OAuthTestBase but now I still get
> un-asserted failures.
> Tests in error:
> testThreeLeggedOAuth
> [felix](org.amdatu.test.integration.tests.OAuthTwoLeggedTest)
> testOAuthSignedRequests
> [felix](org.amdatu.test.integration.tests.OAuthSignedRequestsTest)
> Tests run: 17, Failures: 0, Errors: 2, Skipped: 0
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] There are test failures.
> Please refer to
> C:\bramk\Amdatu\svn\amdatu-dispatcher\integration-tests\target\surefire-reports
> for the individual test results.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 5 minutes 40 seconds
> [INFO] Finished at: Thu Feb 03 17:56:31 CET 2011
> [INFO] Final Memory: 50M/247M
> [INFO]
> ------------------------------------------------------------------------
> C:\bramk\Amdatu\svn\amdatu-dispatcher\integration-tests>more
> target\surefire-reports\org.amdatu.test.integration.tests.OAuthTwoLeggedTest.txt
> -------------------------------------------------------------------------------
> Test set: org.amdatu.test.integration.tests.OAuthTwoLeggedTest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 15.215 sec
> <<< FAILURE!
> testThreeLeggedOAuth
> [felix](org.amdatu.test.integration.tests.OAuthTwoLeggedTest) Time elapsed:
> 15.184 sec <<< ERROR!
> net.oauth.OAuthException: Authorize token form returned 401
> at
> org.amdatu.authentication.oauth.client.OAuthResourceOwnerClient.authorizeToken(OAuthResourceOwnerClient.java:120)
> at
> org.amdatu.test.integration.tests.OAuthTwoLeggedTest.testThreeLeggedOAuth(OAuthTwoLeggedTest.java:72)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.ops4j.pax.exam.junit.extender.impl.internal.CallableTestMethodImpl.injectContextAndInvoke(CallableTestMethodImpl.java:143)
> at
> org.ops4j.pax.exam.junit.extender.impl.internal.CallableTestMethodImpl.call(CallableTestMethodImpl.java:105)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.ops4j.pax.exam.rbc.internal.RemoteBundleContextImpl.remoteCall(RemoteBundleContextImpl.java:80)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
> at sun.rmi.transport.Transport$1.run(Transport.java:159)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
> at
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
> at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
> at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> C:\bramk\Amdatu\svn\amdatu-dispatcher\integration-tests>more
> target\surefire-reports\org.amdatu.test.integration.tests.OAuthSignedRequestsTest.txt
> -------------------------------------------------------------------------------
> Test set: org.amdatu.test.integration.tests.OAuthSignedRequestsTest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 20.582 sec
> <<< FAILURE!
> testOAuthSignedRequests
> [felix](org.amdatu.test.integration.tests.OAuthSignedRequestsTest) Time
> elapsed: 20.549 sec <<< ERROR!
> org.amdatu.authentication.oauth.api.ConsumerAlreadyExistsException: Consumer
> with key 'IntegrationTestConsumerKey' already exists
> at
> org.amdatu.authentication.oauth.consumerregistry.fs.service.FSConsumerRegistryImpl.addConsumer(FSConsumerRegistryImpl.java:102)
> at
> org.amdatu.test.integration.tests.OAuthSignedRequestsTest.testOAuthSignedRequests(OAuthSignedRequestsTest.java:55)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.ops4j.pax.exam.junit.extender.impl.internal.CallableTestMethodImpl.injectContextAndInvoke(CallableTestMethodImpl.java:143)
> at
> org.ops4j.pax.exam.junit.extender.impl.internal.CallableTestMethodImpl.call(CallableTestMethodImpl.java:105)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.ops4j.pax.exam.rbc.internal.RemoteBundleContextImpl.remoteCall(RemoteBundleContextImpl.java:80)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
> at sun.rmi.transport.Transport$1.run(Transport.java:159)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
> at
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
> at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
> at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira