You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/10/14 09:08:10 UTC
[GitHub] [inlong] GanfengTan commented on a diff in pull request #6184: [INLONG-6181][Agent][Dataproxy][SDK] Support node protocol reporting and query
GanfengTan commented on code in PR #6184:
URL: https://github.com/apache/inlong/pull/6184#discussion_r995533603
##########
inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/core/heartbeat/HeartbeatManagerTest.java:
##########
@@ -49,46 +51,58 @@ public class HeartbeatManagerTest extends ServiceBaseTest {
@Test
void testReportHeartbeat() throws InterruptedException {
- HeartbeatMsg msg = createHeartbeatMsg();
- heartbeatManager.reportHeartbeat(msg);
+ List<HeartbeatMsg> heartbeatMsgs = createHeartbeatMsg();
+ heartbeatManager.reportHeartbeat(heartbeatMsgs);
InlongClusterEntity entity = clusterMapper.selectById(1);
log.info(JsonUtils.toJsonString(entity));
- List<InlongClusterEntity> clusterEntities = clusterMapper.selectByKey(null, msg.getClusterName(),
- msg.getComponentType());
- Assertions.assertEquals(1, clusterEntities.size());
- Assertions.assertEquals(clusterEntities.get(0).getName(), msg.getClusterName());
+ for (HeartbeatMsg msg : heartbeatMsgs) {
+ if (null == msg.getProtocolType() || StringUtils.isBlank(msg.getProtocolType())) {
Review Comment:
done
--
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: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org