File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -2588,6 +2588,13 @@ framework will not be able to cache application contexts between test classes an
2588
2588
build process will run significantly slower as a result.
2589
2589
====
2590
2590
2591
+ Since Spring Framework 4.3, the size of the context cache is bounded with a default
2592
+ maximum size of 32. Whenever the maximum size is reached, a _least recently used_ (LRU)
2593
+ eviction policy is used to evict and close stale contexts. The maximum size can be
2594
+ configured from the command line or a build script by setting a JVM system property named
2595
+ `spring.test.context.cache.maxSize`. As an alternative, the same property can be set
2596
+ programmatically via the `SpringProperties` API.
2597
+
2591
2598
Since having a large number of application contexts loaded within a given test suite can
2592
2599
cause the suite to take an unnecessarily long time to execute, it is often beneficial to
2593
2600
know exactly how many contexts have been loaded and cached. To view the statistics for
You can’t perform that action at this time.
0 commit comments