Hi, I'm doing an integration test in the spring and I have a problem where during the addition test in the service, rollback not working, but always add an item to the base.
I have annotation @ Transactional and @ TestPropertySource on test class,
I have application-test.properties and the test is successful but the rollback is not executed and a new item is always added to the test database.
My test class and add test method (last one):
My application-test.properties :
And when execute add address test, every time in my kts_test data base ( db used for testing) is added new item and not rollback.
If anyone can help I would be grateful. Thank you.
Yes that was a problem from the link,
I just managed to solve this morning and couldn't answer.
The problem was with the mySql engine.
By default, it was a myISAM that does not support transactions and had to be changed to the InnoDb engine.
Thanks anyway .
These are the worst of times and these are the best of times. And this is the best tiny ad: