Loading lesson…
Level 1 · Apprentice0 XP
Test adapters against real databases, queues and services in containers.
Step 1 / 6
ProblemRepository tests pass against an in-memory H2 database. In production on PostgreSQL, a query using a JSON operator fails, and a unique constraint behaves differently.
← → step
Before this: Test doubles: fakes, stubs, mocks and spies
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Replace an H2-based repository test with Testcontainers PostgreSQL, add a WireMock test for a partner API timeout, and make the whole integration suite run under two minutes.