use of com.thinkbiganalytics.nifi.core.api.spring.SpringContextService in project kylo by Teradata.
the class JmsCleanupEventServiceTest method setUp.
/**
* Initialize instance variables.
*/
@Before
public void setUp() throws Exception {
// Setup controllers
final SpringContextService springService = new MockSpringContextService();
// Setup test runner
runner.addControllerService(CLEANUP_SERVICE_IDENTIFIER, cleanupService);
runner.addControllerService(SPRING_SERVICE_IDENTIFIER, springService);
runner.setProperty(CLEANUP_SERVICE_PROPERTY, CLEANUP_SERVICE_IDENTIFIER);
runner.setProperty(cleanupService, JmsCleanupEventService.SPRING_SERVICE, SPRING_SERVICE_IDENTIFIER);
runner.enableControllerService(cleanupService);
runner.enableControllerService(springService);
}
use of com.thinkbiganalytics.nifi.core.api.spring.SpringContextService in project kylo by Teradata.
the class TriggerSavepointTest method setup.
@Before
public void setup() throws InitializationException {
runner = TestRunners.newTestRunner(TriggerSavepoint.class);
final SpringContextService springService = new MockSpringContextService();
DistributedMapCacheClient client = new MockDistributedMapCacheClient();
final Map<String, String> clientProperties = new HashMap<>();
runner.addControllerService("client", client, clientProperties);
runner.enableControllerService(client);
DistributedSavepointController service = new DistributedSavepointController();
final Map<String, String> serviceProperties = new HashMap<>();
serviceProperties.put("distributed-cache-service", "client");
runner.addControllerService("service", service, serviceProperties);
runner.addControllerService(SPRING_SERVICE_IDENTIFIER, springService);
runner.setProperty(service, DistributedSavepointController.SPRING_SERVICE, SPRING_SERVICE_IDENTIFIER);
runner.enableControllerService(springService);
runner.enableControllerService(service);
runner.setProperty(SetSavepoint.SAVEPOINT_SERVICE, "service");
runner.setProperty(TriggerSavepoint.SAVEPOINT_ID, "${savepointid}");
runner.setProperty(TriggerSavepoint.BEHAVIOR, TriggerSavepoint.RETRY);
this.provider = service.getProvider();
}
use of com.thinkbiganalytics.nifi.core.api.spring.SpringContextService in project kylo by Teradata.
the class SetSavepointTest method setup.
@Before
public void setup() throws InitializationException {
runner = TestRunners.newTestRunner(SetSavepoint.class);
final SpringContextService springService = new MockSpringContextService();
DistributedMapCacheClient client = new MockDistributedMapCacheClient();
final Map<String, String> clientProperties = new HashMap<>();
runner.addControllerService("client", client, clientProperties);
runner.enableControllerService(client);
DistributedSavepointController service = new DistributedSavepointController();
final Map<String, String> serviceProperties = new HashMap<>();
serviceProperties.put("distributed-cache-service", "client");
runner.addControllerService("service", service, serviceProperties);
runner.addControllerService(SPRING_SERVICE_IDENTIFIER, springService);
runner.setProperty(service, DistributedSavepointController.SPRING_SERVICE, SPRING_SERVICE_IDENTIFIER);
runner.enableControllerService(springService);
runner.enableControllerService(service);
runner.setProperty(SetSavepoint.SAVEPOINT_SERVICE, "service");
runner.setProperty(SetSavepoint.EXPIRATION_DURATION, "24h");
runner.setProperty(SetSavepoint.SAVEPOINT_ID, "${savepointid}");
this.savepointId = "sp1";
runner.setThreadCount(1);
// Setup existing cache entry.
provider = service.getProvider();
}
Aggregations