Search in sources :

Example 1 with CacheStatisticsProvider

use of org.springframework.boot.actuate.cache.CacheStatisticsProvider in project spring-boot by spring-projects.

the class CacheStatisticsAutoConfigurationTests method basicEhCacheCacheStatistics.

@Test
public void basicEhCacheCacheStatistics() {
    load(EhCacheConfig.class);
    CacheStatisticsProvider provider = this.context.getBean("ehCacheCacheStatisticsProvider", CacheStatisticsProvider.class);
    doTestCoreStatistics(provider, true);
}
Also used : CacheStatisticsProvider(org.springframework.boot.actuate.cache.CacheStatisticsProvider) Test(org.junit.Test)

Example 2 with CacheStatisticsProvider

use of org.springframework.boot.actuate.cache.CacheStatisticsProvider in project spring-boot by spring-projects.

the class CacheStatisticsAutoConfigurationTests method noOpCacheStatistics.

@Test
public void noOpCacheStatistics() {
    load(NoOpCacheConfig.class);
    CacheStatisticsProvider provider = this.context.getBean("noOpCacheStatisticsProvider", CacheStatisticsProvider.class);
    Cache books = getCache("books");
    CacheStatistics cacheStatistics = provider.getCacheStatistics(this.cacheManager, books);
    assertCoreStatistics(cacheStatistics, null, null, null);
    getOrCreate(books, "a", "b", "b", "a", "a");
    CacheStatistics updatedCacheStatistics = provider.getCacheStatistics(this.cacheManager, books);
    assertCoreStatistics(updatedCacheStatistics, null, null, null);
}
Also used : CacheStatistics(org.springframework.boot.actuate.cache.CacheStatistics) CacheStatisticsProvider(org.springframework.boot.actuate.cache.CacheStatisticsProvider) Cache(org.springframework.cache.Cache) Test(org.junit.Test)

Example 3 with CacheStatisticsProvider

use of org.springframework.boot.actuate.cache.CacheStatisticsProvider in project spring-boot by spring-projects.

the class CacheStatisticsAutoConfigurationTests method basicJCacheCacheStatistics.

@Test
public void basicJCacheCacheStatistics() {
    load(JCacheCacheConfig.class);
    CacheStatisticsProvider provider = this.context.getBean("jCacheCacheStatisticsProvider", CacheStatisticsProvider.class);
    doTestCoreStatistics(provider, false);
}
Also used : CacheStatisticsProvider(org.springframework.boot.actuate.cache.CacheStatisticsProvider) Test(org.junit.Test)

Example 4 with CacheStatisticsProvider

use of org.springframework.boot.actuate.cache.CacheStatisticsProvider in project spring-boot by spring-projects.

the class CacheStatisticsAutoConfigurationTests method basicInfinispanCacheStatistics.

@Test
public void basicInfinispanCacheStatistics() {
    load(InfinispanConfig.class);
    CacheStatisticsProvider provider = this.context.getBean("infinispanCacheStatisticsProvider", CacheStatisticsProvider.class);
    doTestCoreStatistics(provider, true);
}
Also used : CacheStatisticsProvider(org.springframework.boot.actuate.cache.CacheStatisticsProvider) Test(org.junit.Test)

Example 5 with CacheStatisticsProvider

use of org.springframework.boot.actuate.cache.CacheStatisticsProvider in project spring-boot by spring-projects.

the class CacheStatisticsAutoConfigurationTests method basicHazelcastCacheStatistics.

@Test
public void basicHazelcastCacheStatistics() {
    load(HazelcastConfig.class);
    CacheStatisticsProvider provider = this.context.getBean("hazelcastCacheStatisticsProvider", CacheStatisticsProvider.class);
    doTestCoreStatistics(provider, true);
}
Also used : CacheStatisticsProvider(org.springframework.boot.actuate.cache.CacheStatisticsProvider) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)7 CacheStatisticsProvider (org.springframework.boot.actuate.cache.CacheStatisticsProvider)7 CacheStatistics (org.springframework.boot.actuate.cache.CacheStatistics)2 Cache (org.springframework.cache.Cache)2