use of com.qlangtech.tis.manage.IAppSource in project tis by qlangtech.
the class TestStreamComponentCodeGeneratorFlink method testSingleTableCodeGenerator.
/**
* 测试单表增量脚本生成
*
* @throws Exception
*/
public void testSingleTableCodeGenerator() throws Exception {
// CoreAction.create
// String topologyName = "employees4local";
String collectionName = "mysql_elastic";
IAppSource appSource = IAppSource.load(null, collectionName);
assertTrue(appSource instanceof DataxProcessor);
DataxProcessor dataXProcessor = (DataxProcessor) appSource;
// Optional<ERRules> erRule = ERRules.getErRule(topologyName);
// // 测试针对单表的的topology增量脚本生成
long timestamp = 20191111115959l;
// SqlTaskNodeMeta.SqlDataFlowTopology topology = SqlTaskNodeMeta.getSqlDataFlowTopology(topologyName);
// assertNotNull(topology);
// if (!erRule.isPresent()) {
// ERRules.createDefaultErRule(topology);
// }
List<FacadeContext> facadeList = Lists.newArrayList();
StreamComponentCodeGeneratorFlink streamCodeGenerator = new StreamComponentCodeGeneratorFlink(collectionName, timestamp, facadeList, (IBasicAppSource) appSource);
// EasyMock.replay(streamIncrGenerateStrategy);
streamCodeGenerator.build();
TestStreamComponentCodeGenerator.assertGenerateContentEqual(timestamp, collectionName, "MysqlElasticListener.scala");
// EasyMock.verify(streamIncrGenerateStrategy);
}
Aggregations