use of com.netflix.titus.runtime.connector.eviction.EvictionDataReplicator in project titus-control-plane by Netflix.
the class RelocationConnectorStubs method getApplicationContext.
public ApplicationContext getApplicationContext() {
StaticApplicationContext context = new StaticApplicationContext();
context.getBeanFactory().registerSingleton("titusRuntime", titusRuntime);
context.getBeanFactory().registerSingleton("nodeDataResolver", nodeDataResolver);
context.getBeanFactory().registerSingleton("readOnlyJobOperations", jobOperations);
context.getBeanFactory().registerSingleton("readOnlyEvictionOperations", evictionComponentStub.getEvictionOperations());
context.getBeanFactory().registerSingleton("evictionServiceClient", evictionComponentStub.getEvictionServiceClient());
context.getBeanFactory().registerSingleton("jobManagementClient", mock(JobManagementClient.class));
JobDataReplicator jobDataReplicator = mock(JobDataReplicator.class);
when(jobDataReplicator.getStalenessMs()).thenReturn(0L);
context.getBeanFactory().registerSingleton("jobDataReplicator", jobDataReplicator);
EvictionDataReplicator evictionDataReplicator = mock(EvictionDataReplicator.class);
when(evictionDataReplicator.getStalenessMs()).thenReturn(0L);
context.getBeanFactory().registerSingleton("evictionDataReplicator", evictionDataReplicator);
context.refresh();
return context;
}
Aggregations