1. 20 4月, 2015 6 次提交
    • S
      Ensure that contexts loaded by the TCF are active · 93f403cb
      Sam Brannen 提交于
      This commit adds an assertion to DefaultTestContext's
      getApplicationContext() method to ensure that a context loaded by the
      Spring TestContext Framework (TCF) or retrieved from the ContextCache
      is still active. This extra check helps to avoid situations where
      developers manually close a cached context instead of relying on the
      @DirtiesContext support.
      
      Issue: SPR-12932
      93f403cb
    • S
      Use ConcurrentHashMaps in DefaultContextCache · d66d1605
      Sam Brannen 提交于
      The changes made in 0cb22fc8 would
      result in contexts not being properly closed if evicted from the
      ConcurrentReferenceHashMap by the Garbage Collector.
      
      This commit reverts those changes and returns to using standard
      ConcurrentHashMaps for the time being.
      
      Issue: SPR-7687
      d66d1605
    • S
      Introduce TestContextManager(TestContextBootstrapper) constructor · c52a0ccd
      Sam Brannen 提交于
      Issue: SPR-12683
      c52a0ccd
    • S
      Merge pull request #780 from sbrannen/SPR-12683 · 9e6a5ae4
      Sam Brannen 提交于
      Improve extensibility of TestContext bootstrapping & context caching
      
      These commits include numerous refactorings and enhancements to the
      bootstrapping and context caching mechanisms in the Spring TestContext
      Framework.
      
      Issue: SPR-12683
      9e6a5ae4
    • S
      Improve extensibility of TestContext bootstrapping & context caching · 129488cb
      Sam Brannen 提交于
       - DefaultBootstrapContext and DefaultCacheAwareContextLoaderDelegate
         are now public classes in the 'support' subpackage.
      
       - Introduced getCacheAwareContextLoaderDelegate() in
         AbstractTestContextBootstrapper as an extension point for configuring
         custom ContextCache support.
      
       - Introduced reflection-based createBootstrapContext() utility method
         in BootstrapUtils; TestContextManager now delegates to BootstrapUtils
         in order to avoid package cycles.
      
       - Introduced logStatistics() method in the ContextCache API and defined
         statistics logging category as a constant.
      
       - DefaultCacheAwareContextLoaderDelegate now delegates to
         ContextCache.logStatistics().
      
      Issue: SPR-12683
      129488cb
    • S
      Convert ContextCache to interface with default implementation · e6c24f71
      Sam Brannen 提交于
       - ContextCache is now a public interface.
      
       - Introduced public DefaultContextCache implementation in the 'support'
         subpackage.
      
      Issue: SPR-12683
      e6c24f71
  2. 19 4月, 2015 6 次提交
  3. 18 4月, 2015 2 次提交
    • S
      Use SoftReferences for context caching in the TCF · 0cb22fc8
      Sam Brannen 提交于
      Prior to this commit, the ContextCache in the Spring TestContext
      Framework (TCF) cached ApplicationContexts in a ConcurrentHashMap using
      strong references. This practice can occasionally lead to
      OutOfMemoryErrors when running a large number of tests in a test suite
      with varying context configuration since the context cache becomes
      overpopulated over time.
      
      This commit addresses this issue by using Spring's
      ConcurrentReferenceHashMap which uses SoftReferences for both the keys
      (i.e., MergedContextConfiguration instances) and values (i.e.,
      ApplicationContexts) stored in the map that backs the ContextCache.
      
      Issue: SPR-7687
      0cb22fc8
    • S
      Introduce reset() method in ContextCache · 2a4f4cd2
      Sam Brannen 提交于
      2a4f4cd2
  4. 17 4月, 2015 14 次提交
  5. 16 4月, 2015 4 次提交
  6. 15 4月, 2015 8 次提交