Our own integration tests are not likely to benefit from context caching so we could apply @DirtiesContext more liberally. This would also help prevent issues such as #38176

Comment From: mhalbritter

We could also set spring.test.context.cache.maxSize=0 to effectively disable the cache. See here.

Comment From: philwebb

That might be a good option for most modules. I seem to remember we have some tests that might test context caching but I'm not sure a which level they work.

Comment From: mhalbritter

Ah, spring.test.context.cache.maxSize can't be set to 0, it must be positive.

Comment From: mhalbritter

I've labelled it as team meeting as we should talk about if that brings any benefit. Context caching is on by default for all users, if we disable it, we might not catch some bugs that would occur if it's switched on.

Comment From: philwebb

After some discussion we decided not to do this. We want our tests to reflect a typical user setup.