Search in sources :

Example 1 with LoadBalancerValidationConfiguration

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

the class DefaultLoadBalancerServiceTest method setUp.

@Before
public void setUp() throws Exception {
    runtime = TitusRuntimes.internal();
    client = mock(LoadBalancerConnector.class);
    loadBalancerStore = new InMemoryLoadBalancerStore();
    reconciler = mock(LoadBalancerReconciler.class);
    reconcilerEvents = PublishSubject.create();
    when(reconciler.events()).thenReturn(reconcilerEvents.toSerialized());
    v3JobOperations = mock(V3JobOperations.class);
    loadBalancerJobOperations = new LoadBalancerJobOperations(v3JobOperations);
    LoadBalancerValidationConfiguration validationConfiguration = LoadBalancerTests.mockValidationConfig(30);
    validator = new DefaultLoadBalancerJobValidator(v3JobOperations, loadBalancerStore, validationConfiguration);
    testScheduler = Schedulers.test();
}
Also used : LoadBalancerValidationConfiguration(com.netflix.titus.api.loadbalancer.model.sanitizer.LoadBalancerValidationConfiguration) LoadBalancerConnector(com.netflix.titus.api.connector.cloud.LoadBalancerConnector) InMemoryLoadBalancerStore(com.netflix.titus.runtime.store.v3.memory.InMemoryLoadBalancerStore) V3JobOperations(com.netflix.titus.api.jobmanager.service.V3JobOperations) DefaultLoadBalancerJobValidator(com.netflix.titus.api.loadbalancer.model.sanitizer.DefaultLoadBalancerJobValidator) Before(org.junit.Before)

Example 2 with LoadBalancerValidationConfiguration

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

the class LoadBalancerTests method mockValidationConfig.

static LoadBalancerValidationConfiguration mockValidationConfig(int maxLbsPerJob) {
    final LoadBalancerValidationConfiguration config = mock(LoadBalancerValidationConfiguration.class);
    when(config.getMaxLoadBalancersPerJob()).thenReturn(maxLbsPerJob);
    return config;
}
Also used : LoadBalancerValidationConfiguration(com.netflix.titus.api.loadbalancer.model.sanitizer.LoadBalancerValidationConfiguration)

Aggregations

LoadBalancerValidationConfiguration (com.netflix.titus.api.loadbalancer.model.sanitizer.LoadBalancerValidationConfiguration)2 LoadBalancerConnector (com.netflix.titus.api.connector.cloud.LoadBalancerConnector)1 V3JobOperations (com.netflix.titus.api.jobmanager.service.V3JobOperations)1 DefaultLoadBalancerJobValidator (com.netflix.titus.api.loadbalancer.model.sanitizer.DefaultLoadBalancerJobValidator)1 InMemoryLoadBalancerStore (com.netflix.titus.runtime.store.v3.memory.InMemoryLoadBalancerStore)1 Before (org.junit.Before)1