Jave-Chen commented on a change in pull request #1928: add ResInfoTest.java ut
URL:
https://github.com/apache/incubator-dolphinscheduler/pull/1928#discussion_r377389123
##########
File path:
dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/ResInfoTest.java
##########
@@ -14,13 +14,30 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.apache.dolphinscheduler.common.utils;
+import org.junit.Assert;
+import org.junit.Test;
+import java.util.Date;
+import org.apache.dolphinscheduler.common.model.Server;
+
+public class ResInfoTest {
+ @Test
+ public void testGetHeartBeatInfo() {
+ String info = ResInfo.getHeartBeatInfo(new Date());
+ Assert.assertEquals(info.split(",").length, 7);
Review comment:
There is a code smell in Sonar analysis: Swap these 2 arguments so they are
in the correct order: expected value, actual value.
https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&issues=AXAv9q6wCNVECePiTlLM&open=AXAv9q6wCNVECePiTlLM&pullRequest=1928
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services