Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #3903] Unwritten public or protected field [HeartbeatRequestBody] #4757

Merged
merged 2 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,16 @@
return map;
}

@ToString
@Data
public static class HeartbeatEntity {

public String topic;
public String serviceId;
public String url;
public String instanceId;
private String topic;
private String serviceId;
private String url;
private String instanceId;

Check warning on line 75 in eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/HeartbeatRequestBody.java

View check run for this annotation

Codecov / codecov/patch

eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/body/client/HeartbeatRequestBody.java#L72-L75

Added lines #L72 - L75 were not covered by tests


}


}
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
client.setIp(heartbeatRequestHeader.getIp());
client.setPid(heartbeatRequestHeader.getPid());
client.setConsumerGroup(heartbeatRequestBody.getConsumerGroup());
client.setTopic(heartbeatEntity.topic);
client.setUrl(heartbeatEntity.url);
client.setTopic(heartbeatEntity.getTopic());
client.setUrl(heartbeatEntity.getUrl());

Check warning on line 111 in eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/HeartBeatProcessor.java

View check run for this annotation

Codecov / codecov/patch

eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/HeartBeatProcessor.java#L110-L111

Added lines #L110 - L111 were not covered by tests
client.setLastUpTime(new Date());

if (StringUtils.isAnyBlank(client.getTopic(), client.getUrl())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@
try {
final List<HeartbeatRequestBody.HeartbeatEntity> heartbeatEntities = topicList.stream().map(subscriptionItem -> {
final HeartbeatRequestBody.HeartbeatEntity heartbeatEntity = new HeartbeatRequestBody.HeartbeatEntity();
heartbeatEntity.topic = subscriptionItem.getTopic();
heartbeatEntity.url = subscribeUrl;
heartbeatEntity.setTopic(subscriptionItem.getTopic());
heartbeatEntity.setUrl(subscribeUrl);

Check warning on line 118 in eventmesh-sdks/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/consumer/EventMeshHttpConsumer.java

View check run for this annotation

Codecov / codecov/patch

eventmesh-sdks/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/consumer/EventMeshHttpConsumer.java#L117-L118

Added lines #L117 - L118 were not covered by tests
return heartbeatEntity;
}).collect(Collectors.toList());

Expand Down
Loading