question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@DataJdbcTest is documented as being transactional but isn't

See original GitHub issue

I’ll propose to support the @Transactional as meta-annotation at @DataJdbcTest as same with @JdbcTest. WDYT?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
philwebbcommented, Jul 14, 2019

I think we probably should. @DataJpaTest also has it.

1reaction
snicollcommented, Jul 19, 2019

Given that this is documented, let’s turn that into a bug and fix the behaviour in 2.1.x

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found