Search in sources :

Example 11 with BulkheadConfig

use of io.github.resilience4j.bulkhead.BulkheadConfig in project resilience4j by resilience4j.

the class SemaphoreBulkheadTest method testCreateWithNullConfig.

@Test
public void testCreateWithNullConfig() {
    // given
    Supplier<BulkheadConfig> configSupplier = () -> null;
    // when
    Bulkhead bulkhead = Bulkhead.of("test", configSupplier);
    // then
    assertThat(bulkhead).isNotNull();
    assertThat(bulkhead.getBulkheadConfig()).isNotNull();
}
Also used : Bulkhead(io.github.resilience4j.bulkhead.Bulkhead) BulkheadConfig(io.github.resilience4j.bulkhead.BulkheadConfig) Test(org.junit.Test)

Aggregations

BulkheadConfig (io.github.resilience4j.bulkhead.BulkheadConfig)11 Test (org.junit.Test)10 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)3 Bulkhead (io.github.resilience4j.bulkhead.Bulkhead)1 BulkheadEvent (io.github.resilience4j.bulkhead.event.BulkheadEvent)1 Before (org.junit.Before)1