Open
Conversation
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
e03579a to
701bfbc
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements concrete isInvalid() parameter validation for several protocol entities in hertzbeat-common-core (replacing prior TODO placeholders) and adds unit tests to exercise the new validation behavior.
Changes:
- Implement
isInvalid()checks for Websocket, Redfish, Push, JMX, and IPMI protocol entities. - Add new JUnit tests covering valid/invalid protocol configurations for those entities.
- Fix a typo in
Protocolinterface Javadoc (“vaild” → “valid”).
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/job/protocol/WebsocketProtocol.java | Adds host/port/path validation logic in isInvalid() |
| hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/job/protocol/RedfishProtocol.java | Adds host/port/credentials/timeout/schema/jsonPath validation logic |
| hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/job/protocol/PushProtocol.java | Adds host/port/uri/fields validation logic |
| hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/job/protocol/JmxProtocol.java | Adds objectName/ssl/auth/url-or-host validation logic |
| hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/job/protocol/IpmiProtocol.java | Adds host/port/credentials/type/raw-field validation logic |
| hertzbeat-common-core/src/main/java/org/apache/hertzbeat/common/entity/job/protocol/Protocol.java | Fixes Javadoc typo |
| hertzbeat-common-core/src/test/java/org/apache/hertzbeat/common/entity/job/protocol/WebsocketProtocolTest.java | Adds tests for websocket protocol validation |
| hertzbeat-common-core/src/test/java/org/apache/hertzbeat/common/entity/job/protocol/RedfishProtocolTest.java | Adds tests for redfish protocol validation |
| hertzbeat-common-core/src/test/java/org/apache/hertzbeat/common/entity/job/protocol/PushProtocolTest.java | Adds tests for push protocol validation |
| hertzbeat-common-core/src/test/java/org/apache/hertzbeat/common/entity/job/protocol/JmxProtocolTest.java | Adds tests for JMX protocol validation |
| hertzbeat-common-core/src/test/java/org/apache/hertzbeat/common/entity/job/protocol/IpmiProtocolTest.java | Adds tests for IPMI protocol validation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...mon-core/src/test/java/org/apache/hertzbeat/common/entity/job/protocol/IpmiProtocolTest.java
Show resolved
Hide resolved
...on-core/src/main/java/org/apache/hertzbeat/common/entity/job/protocol/WebsocketProtocol.java
Outdated
Show resolved
Hide resolved
...-common-core/src/main/java/org/apache/hertzbeat/common/entity/job/protocol/PushProtocol.java
Show resolved
Hide resolved
...mmon-core/src/main/java/org/apache/hertzbeat/common/entity/job/protocol/RedfishProtocol.java
Show resolved
Hide resolved
...-common-core/src/main/java/org/apache/hertzbeat/common/entity/job/protocol/IpmiProtocol.java
Outdated
Show resolved
Hide resolved
...ore/src/test/java/org/apache/hertzbeat/common/entity/job/protocol/WebsocketProtocolTest.java
Show resolved
Hide resolved
...mon-core/src/test/java/org/apache/hertzbeat/common/entity/job/protocol/PushProtocolTest.java
Show resolved
Hide resolved
...-core/src/test/java/org/apache/hertzbeat/common/entity/job/protocol/RedfishProtocolTest.java
Show resolved
Hide resolved
…n/entity/job/protocol/WebsocketProtocol.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: shown <jishiwen.jsw@digital-engine.com>
…n/entity/job/protocol/IpmiProtocol.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: shown <jishiwen.jsw@digital-engine.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.