-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TransactionProviderNotFoundException for client side tests #14
Comments
Thanks for the report. Can you provide your runtime details and version of libraries you are using? Also a test which is failing would be great to look at. |
Do you need anything specific? This arquillian build is quite complex, combining spock with graphene and cube. Below is my dependency tree. The test that is failing is a client side selenium test with graphene.
|
|
|
For now, I've worked around this issue by registering my own client side 'NoTransactionProvider' with empty implementations for all 3 methods. |
I ran into the same problem - is there any update yet? Or some other branch that one could use in the meantime? Many thanks! |
We are using the following work around: public class NoTransactionProvider implements TransactionProvider {
@Override public void beginTransaction(TransactionalTest test) {}
@Override public void commitTransaction(TransactionalTest test) {}
@Override public void rollbackTransaction(TransactionalTest test) {}
} You need to register this public class NoTxWorkAround implements LoadableExtension {
@Override
public void register(ExtensionBuilder builder) {
builder.service(TransactionProvider.class, NoTransactionProvider.class);
}
} Register this LoadableExtension via Java's ServiceLoading via a file in your project named |
@papegaaij : Hey, thanks for sharing, Sir - very kind of you! |
Hi,
|
Hi guys, I've got the same issue here and the cause, at least in my project, is persistence-extension. If I remove persistence-extension the issue goes away. I have attached a simple reproducer, a |
Hi @rmpestano, thx for your reproducer. Unfortunately, the problem is still in the transaction project as the persistence-extension brings the transaction as its transitive dependency... |
Hi guys, what approach we will take? if you decide the solution, e.g embed the NoTransactionProvider on client extensions like Graphene/Drone I can help with the PR. IMHO this is a serious bug where we can't have client and in-container tests on the same project without the workaround and I don't want to spread the NoTxWorkAround extension on every project here at the company. WDYT? |
Hey @rmpestano, there is one case when we use txs on the client side, but I doubt this extension is widely used - see here. That said I think the second option proposed by @MatousJobanek. If you are keen to provide a PR that would be awesome. Many thanks! With this fix we can release a new version instantly. |
New version |
@bartoszmajsak I can confirm that - after upgrading to 1.0.5 and rolling back @papegaaij 's workaround - my client side tests are now working fine. |
When upgrading from Java8+wildfly12 to Java11+wildfly15 I ran into this exception around arquillian-persistence. Until now, I included arquillian and the persistence extension by including:
The lastest version is 1.2.0.1 here, but this provides arquillian-transaction-impl-base in 1.0.4 Clients the use aquillian by taking the org.arquillian.universe:arquillian-persistence:$VERSION should get an updated pom-project so that the most recent subprojects will be acquired by maven.
|
Thansk @jenskreidler for spotting the problem and detailed report. Much appreciated! For some reason @dependabot which we are using for automated dependency bumps didn't open PR for this particular version. I just updated universe-bom and released |
Hi guys, note that using APE without universe will lead to the same problem, see arquillian/arquillian-extension-persistence#102 |
Issue Overview
Client side tests throw the exception below. TransactionProviderProducer:52 seems suspicious. It returns true for client side tests.
The text was updated successfully, but these errors were encountered: