Transactional Gotchas in Spring Boot Tests

Did you know that when you run transactional tests in Spring Boot applications, a rollback in the tests doesn’t cause a rollback in the database? I certainly didn’t. This video demonstrates the problem (and how at first I got “lucky” with JUnit default ordering of my tests), and how to fix it. Testing transactions can be tricky, but it is manageable once you know how. Tales from the jar side, newsletter: https://kenkousen.substack.com Tales from the jar side, videos:    / @talesfromthejarside   GitHub repository: https://github.com/kousen/shopping_v3 00:00 - Welcome 04:14 - Testing the Repository 08:00 - Testing the Controller in a Running Server 10:36 - A Naive Controller Test 12:39 - JUnit test order 15:33 - Transactions in tests != Transactions on server 23:40 - Conclusions

Convert Text to Audio with Spring and OpenAI
▶︎

Convert Text to Audio with Spring and OpenAI

Learnings From Netflix To Effective Testing With Spring Boot (SpringOne 2024)
▶︎

Learnings From Netflix To Effective Testing With Spring Boot (SpringOne 2024)

Spring Boot testing: Zero to Hero by Daniel Garnier-Moiroux
▶︎

Spring Boot testing: Zero to Hero by Daniel Garnier-Moiroux

Spring & Spring Data JPA: Managing Transactions
▶︎

Spring & Spring Data JPA: Managing Transactions

Spring Boot Deep Dive | How It Simplifies Java Apps & Microservices
▶︎

Spring Boot Deep Dive | How It Simplifies Java Apps & Microservices

Intermediate Representation | Writing a Compiler in C++ | risc-v toolchain | Day 9
▶︎

Intermediate Representation | Writing a Compiler in C++ | risc-v toolchain | Day 9

10 Spring and Spring Boot Common Mistakes You Need To STOP
▶︎

10 Spring and Spring Boot Common Mistakes You Need To STOP

[QUESTION] Why doesn't @Transactional work when called within the same class?
▶︎

[QUESTION] Why doesn't @Transactional work when called within the same class?

Beyond Built-in: Advanced Testing Techniques for Spring Boot Applications by Michael Vitz @ SpringIO
▶︎

Beyond Built-in: Advanced Testing Techniques for Spring Boot Applications by Michael Vitz @ SpringIO

Watch this if everything feels too much (gentle comfort for tired women)
▶︎

Watch this if everything feels too much (gentle comfort for tired women)

How Propagation Works in Spring Boot Transactions? | @Transactional Deep Dive
▶︎

How Propagation Works in Spring Boot Transactions? | @Transactional Deep Dive

Spring Security Architecture Principles by Daniel Garnier-Moiroux @ Spring I/O 2024
▶︎

Spring Security Architecture Principles by Daniel Garnier-Moiroux @ Spring I/O 2024

God Says:"I JUST CONFIRMED — ONLY YOU CAN SEE THIS LETTER"/God Message Now/God Message
▶︎

God Says:"I JUST CONFIRMED — ONLY YOU CAN SEE THIS LETTER"/God Message Now/God Message

Real World Lean Java Practices, Patterns, Hacks, and Workarounds
▶︎

Real World Lean Java Practices, Patterns, Hacks, and Workarounds

Top 10 Spring Annotations to know in 2024
▶︎

Top 10 Spring Annotations to know in 2024

Test Driven Development (TDD) in Spring
▶︎

Test Driven Development (TDD) in Spring

Zig 2026: No-AI Policy, $670K Foundation, Left GitHub & Why Zig Isn’t 1.0 - Andrew Kelley Explains
▶︎

Zig 2026: No-AI Policy, $670K Foundation, Left GitHub & Why Zig Isn’t 1.0 - Andrew Kelley Explains

Performance oriented Spring Data JPA & Hibernate by Maciej Walkowiak
▶︎

Performance oriented Spring Data JPA & Hibernate by Maciej Walkowiak

Performance oriented Spring Data JPA & Hibernate by Maciej Walkowiak
▶︎

Performance oriented Spring Data JPA & Hibernate by Maciej Walkowiak

ASMR Addictive Fast Tapping Collection For Deep Sleep & Anxiety Relief (No Talking) — 2.5 Hours
▶︎

ASMR Addictive Fast Tapping Collection For Deep Sleep & Anxiety Relief (No Talking) — 2.5 Hours