Alfresco / alfresco-sdk

The Alfresco In-Process SDK is based on Apache Maven, includes support for rapid and standard development, testing, packaging, versioning and release of your Alfresco integration and extension projects
Apache License 2.0
186 stars 113 forks source link

Do not run test methods in a transaction by default #492

Closed tartard closed 5 years ago

tartard commented 6 years ago

Tests might throw ConcurrencyFailureException or CannotAcquireLockException when performing two operations on a node.

This is because a transaction is initiated by default when calling the RunTestWebscript since this webscript requires authentication.

A solution is to force the WS not to initiate a transaction and leave this option to the developpers.

ohej commented 5 years ago

After much consideration, we have decided not to accept and merge this pull request.

While I agree the behaviour should be different, we have to appreciate that a lot of developers have already written tests that can be depending on this exact scenario. Merging this could potentially break a lot of tests and would introduce a lot of potential breaking changes.

I'm going to close the PR, but I really want to thank you for the contribution.