healchow commented on code in PR #6294:
URL: https://github.com/apache/inlong/pull/6294#discussion_r1008973302
##########
inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/sort/SortServiceImplTest.java:
##########
@@ -295,22 +306,19 @@ private void preparePulsar(String pulsarName, boolean
isConsumable, String tag)
}
private void prepareTask(String taskName, String groupId, String
clusterName) {
- StreamSinkEntity entity = new StreamSinkEntity();
- entity.setInlongGroupId(groupId);
- entity.setInlongStreamId("1");
- entity.setSinkType(TEST_SINK_TYPE);
- entity.setSinkName(taskName);
- entity.setInlongClusterName(clusterName);
- entity.setDataNodeName(taskName);
- entity.setSortTaskName(taskName);
- entity.setCreator(TEST_CREATOR);
- Date now = new Date();
- entity.setCreateTime(now);
- entity.setModifyTime(now);
- entity.setIsDeleted(InlongConstants.UN_DELETED);
- entity.setVersion(InlongConstants.INITIAL_VERSION);
- entity.setExtParams("{\"delimiter\":\"|\",\"dataType\":\"text\"}");
- streamSinkEntityMapper.insert(entity);
+ SinkRequest request = new HiveSinkRequest();
+ request.setDataNodeName(taskName);
+ request.setSinkType(SinkType.HIVE);
+ request.setInlongClusterName(clusterName);
+ request.setSinkName(taskName);
+ request.setSortTaskName(taskName);
+ request.setInlongGroupId(groupId);
+ request.setInlongStreamId("1");
+ Map<String, Object> properties = new HashMap<>();
+ properties.put("delimiter", "|");
+ properties.put("dataType", "text");
+ request.setProperties(properties);
+ streamSinkService.save(request, TEST_CREATOR);
}
}
Review Comment:
Add one blank line after the end of `}`, thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]