use of org.apache.samza.system.MockSystemFactory in project samza by apache.
the class SamzaSqlIntegrationTestHarness method runApplication.
protected void runApplication(Config config) {
// Use MockSystemFactory for the coordinator system
MockSystemFactory.MSG_QUEUES.put(new SystemStreamPartition(MOCK_METADATA_SYSTEM, CoordinatorStreamUtil.getCoordinatorStreamName(SamzaSqlTestConfig.SQL_JOB, SamzaSqlTestConfig.SQL_JOB_PROCESSOR_ID), new Partition(0)), new ArrayList<>());
HashMap<String, String> mapConfig = new HashMap<>();
mapConfig.put(JobConfig.JOB_COORDINATOR_SYSTEM, MOCK_METADATA_SYSTEM);
mapConfig.put(String.format(SystemConfig.SYSTEM_FACTORY_FORMAT, MOCK_METADATA_SYSTEM), MockSystemFactory.class.getName());
// configs for using in-memory system as the default system
mapConfig.putAll(baseInMemorySystemConfigs());
mapConfig.putAll(config);
SamzaSqlApplicationRunner runner = new SamzaSqlApplicationRunner(true, new MapConfig(mapConfig));
executeRun(runner, config);
runner.waitForFinish();
}
Aggregations