~/talk

How fixing a broken window cut down our build time by 50%

Talkat Spring I/O 2022 · 2022-05-26..05-27· [developer-experience]
slides:none on file

A single central @DirtiesContext on an abstract integration base class forces every test to close its Spring TestContext, causing each new test to start a fresh context and inflating build time from ~25 to ~12 minutes after the fix (a 50% reduction). The fix removes that annotation, replaces inheritance with composition, and standardizes reuse with ApplicationContextInitializer to provision per-context resources (random SQS queues), uses WireMock and Testcontainers for external systems and databases, and favors sliced tests like @WebMvcTest to prevent context explosion.

AI-written summary · about

  1. 0:00Intro
  2. 0:23How Fixing a Broken Window Cut Down Our Build Time by 50%
  3. 0:37How It Started
  4. 2:04The Broken Windows Theory
  5. 2:52It Does Not Always have to Be a Window
  6. 4:41Impact of Fixing the Broken Window
  7. 5:55Goals for This Talk
  8. 7:35Spring TestContext Framework: Context Caching
  9. 10:21Spring TestContext Framework Context Caching
  10. 16:31Context Caching and Reusability Red Flags
  11. 18:13Context Caching Indicators
  12. 26:30Message Thefts
  13. 29:47Pitfall #2: Data Overflow
  14. 32:54Remote Connections
  15. 41:15Pitfalls: Setup Variety
  16. 43:03The Result
  17. 44:29Testing Spring Boot Applications Masterclass
  18. 45:28Stratospheric - From Zero to Production with Spring Boot and AWS
  19. 46:28Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.