Class MetricsConfigTest

java.lang.Object
ubic.gemma.core.config.MetricsConfigTest

public class MetricsConfigTest extends Object
Smoke test for the metrics Spring profile.

Phase 2 (commit ab94b884a4) deleted MeterRegistryEhcacheConfigurer during the Ehcache 2 -> Ehcache 3 / jakarta migration, which left the metrics profile broken: any attempt to start it would fail at compile time on a dead reference. Phase 3 introduced MeterRegistryJCacheConfigurer (Micrometer's JCacheMetrics binder over the new JSR-107 cache manager) and re-wired MetricsConfig to use it.

This test boots MetricsConfig under the metrics profile with all heavy dependencies (SessionFactory, HikariDataSource, TaskExecutor, TaskRunningService, JCache CacheManager) mocked, and verifies that every @Bean instantiates cleanly. It does not exercise the binders against a real datasource / Hibernate / JCache provider — that happens inside the integration-test context — but it does guarantee that the profile loads, which is the regression we care about here.

  • Constructor Details

    • MetricsConfigTest

      public MetricsConfigTest()
  • Method Details

    • metricsProfileBeansInstantiateCleanly

      @Test public void metricsProfileBeansInstantiateCleanly()
    • metricsProfileInactiveByDefault

      @Test public void metricsProfileInactiveByDefault()