@DataJdbcTest is documented as being transactional but isn't
See original GitHub issueI’ll propose to support the @Transactional
as meta-annotation at @DataJdbcTest
as same with @JdbcTest
. WDYT?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
JUnit tests always rollback the transactions - Stack Overflow
It should work, like you expect it, but may be you open another transaction within your class under test or you have an...
Read more >46. Testing - Spring
By default, Data JDBC tests are transactional and roll back at the end of each test. See the relevant section in the Spring...
Read more >Should my tests be @Transactional? - Marco Behler
The fallacy. Some people conclude from this that you cannot be sure that your tests actually writes data do the database. But this...
Read more >Automatic Rollback of Transactions in Spring Tests
Put @Transactional on your test class or methods and test-managed transactions will automatically be rollbacked.
Read more >Learn how to test your Data JDBC Components - YouTube
In this tutorial, you will learn how to use the @ DataJdbcTest annotation in Spring Boot to test your JDBC components.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think we probably should.
@DataJpaTest
also has it.Given that this is documented, let’s turn that into a bug and fix the behaviour in
2.1.x