Search in sources :

Example 1 with LoadBalancerSanitizerBuilder

use of com.netflix.titus.api.loadbalancer.model.sanitizer.LoadBalancerSanitizerBuilder in project titus-control-plane by Netflix.

the class CassandraLoadBalancerStoreTest method getInitdStore.

/**
 * Creates, loads, and returns a store instance based on what was already in Cassandra.
 */
private CassandraLoadBalancerStore getInitdStore() {
    Session session = cassandraCQLUnit.getSession();
    CassandraStoreConfiguration configuration = mock(CassandraStoreConfiguration.class);
    when(configuration.getLoadBalancerWriteConcurrencyLimit()).thenReturn(10);
    when(configuration.getLoadBalancerDeleteConcurrencyLimit()).thenReturn(1);
    EntitySanitizer entitySanitizer = new LoadBalancerSanitizerBuilder().build();
    CassandraLoadBalancerStore store = new CassandraLoadBalancerStore(configuration, entitySanitizer, session);
    store.init();
    return store;
}
Also used : EntitySanitizer(com.netflix.titus.common.model.sanitizer.EntitySanitizer) LoadBalancerSanitizerBuilder(com.netflix.titus.api.loadbalancer.model.sanitizer.LoadBalancerSanitizerBuilder) Session(com.datastax.driver.core.Session)

Aggregations

Session (com.datastax.driver.core.Session)1 LoadBalancerSanitizerBuilder (com.netflix.titus.api.loadbalancer.model.sanitizer.LoadBalancerSanitizerBuilder)1 EntitySanitizer (com.netflix.titus.common.model.sanitizer.EntitySanitizer)1