Class CommonCachesTestExecutionListener

java.lang.Object
org.springframework.test.context.support.AbstractTestExecutionListener
org.springframework.test.context.support.CommonCachesTestExecutionListener
All Implemented Interfaces:
Ordered, TestExecutionListener

public class CommonCachesTestExecutionListener extends AbstractTestExecutionListener
TestExecutionListener which makes sure that common caches are cleared once they are no longer required.

Clears the resource caches of the ApplicationContext since they are only required during the bean initialization phase. Runs after DirtiesContextTestExecutionListener since dirtying the context will close it and remove it from the context cache, making it unnecessary to clear the associated resource caches.

Since:
6.2
Author:
Stephane Nicoll