Search in sources :

Example 1 with RegistryServiceAdapter

use of com.hotels.styx.infrastructure.RegistryServiceAdapter in project styx by ExpediaGroup.

the class StyxServerTest method disablesResourceLeakDetectionByDefault.

@Test
public void disablesResourceLeakDetectionByDefault() {
    StyxServerComponents config = new StyxServerComponents.Builder().registry(new MicrometerRegistry(new CompositeMeterRegistry())).configuration(EMPTY_CONFIGURATION).additionalServices(Map.of("backendServiceRegistry", new RegistryServiceAdapter(new MemoryBackedRegistry<>()))).build();
    new StyxServer(config);
    assertThat(ResourceLeakDetector.getLevel(), is(DISABLED));
}
Also used : StyxServerComponents(com.hotels.styx.startup.StyxServerComponents) CompositeMeterRegistry(io.micrometer.core.instrument.composite.CompositeMeterRegistry) MicrometerRegistry(com.hotels.styx.api.MicrometerRegistry) MemoryBackedRegistry(com.hotels.styx.infrastructure.MemoryBackedRegistry) RegistryServiceAdapter(com.hotels.styx.infrastructure.RegistryServiceAdapter) Test(org.junit.jupiter.api.Test)

Aggregations

MicrometerRegistry (com.hotels.styx.api.MicrometerRegistry)1 MemoryBackedRegistry (com.hotels.styx.infrastructure.MemoryBackedRegistry)1 RegistryServiceAdapter (com.hotels.styx.infrastructure.RegistryServiceAdapter)1 StyxServerComponents (com.hotels.styx.startup.StyxServerComponents)1 CompositeMeterRegistry (io.micrometer.core.instrument.composite.CompositeMeterRegistry)1 Test (org.junit.jupiter.api.Test)1