From cbcaf6cdbd7fe61fbbb8274fb388116950b4a8cf Mon Sep 17 00:00:00 2001 From: cancaicai <2356672992@qq.com> Date: Tue, 25 Jun 2024 11:51:47 +0800 Subject: [PATCH] Add test --- .../test/java/com/alipay/sofa/jraft/entity/PeerIdTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jraft-core/src/test/java/com/alipay/sofa/jraft/entity/PeerIdTest.java b/jraft-core/src/test/java/com/alipay/sofa/jraft/entity/PeerIdTest.java index a83910a20..7cfd7e896 100644 --- a/jraft-core/src/test/java/com/alipay/sofa/jraft/entity/PeerIdTest.java +++ b/jraft-core/src/test/java/com/alipay/sofa/jraft/entity/PeerIdTest.java @@ -25,6 +25,12 @@ public class PeerIdTest { + @Test + public void testPeerIdIsBlank() { + final PeerId serverId = new PeerId(); + assertFalse(serverId.parse("")); + } + @Test public void testToStringParse() { final PeerId peer = new PeerId("192.168.1.1", 8081, 0);