Closed vilmosnagy closed 8 years ago
Thank you very much for this contribution and example proving the issue. I will make sure it will land on the develop as soon as possible. I will try to incorporate your example as part of the test suite either here or in APE.
I'm not totally sure, that there is any transaction.
In fact when you use @UsingDataSet
from "Arquillian Persistence Extension" it is by convention wrapping your test in the transaction.
Pushed upstream. Thank you for your contribution!
Thanks! Do you know, when you'll release it?
It's on @aslakknutsen desk now, as I don't have sufficient rights to pull the trigger :) I think it's safe to assume it will happen tomorrow.
pushed live, 1.0.3.Final
Thanks a lot!
Hello,
I think this bugfix is very similar to #9 .
If some exception occurs during the test-setup (for example, my datasets contain invalid data), the original exception is still hidden by an NPE. The NPE occurs during the rollback of the transaction. (I'm not totally sure, that there is any transaction.)
See one example here: https://github.com/vilmosnagy/arquillian-transaction-bug
There are 3 test-cases:
test_should_pass_without_dataset
: in this test-case no dataset used, test passes.test_should_pass_with_dataset
: test uses a correct dataset, passestest_should_fail_with_incorrect_dataset
: test uses an incorrect dataset (one row contains an invalid column name), and NPE occurs, instead of ...Here is the NPE's stack trace (the last lines only):
And here's the original exception, thrown by H2:
I'd be happy to see the second exception, if something fails during the initialization of a test-case.