You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/08/22 08:19:47 UTC

[GitHub] [rocketmq] ShannonDing commented on a diff in pull request #4860: add missing assertions of some test cases

ShannonDing commented on code in PR #4860:
URL: https://github.com/apache/rocketmq/pull/4860#discussion_r951145689


##########
acl/src/test/java/org/apache/rocketmq/acl/common/AclSignerTest.java:
##########
@@ -27,8 +28,9 @@ public void calSignatureExceptionTest(){
 
     @Test
     public void calSignatureTest(){
-        AclSigner.calSignature("RocketMQ","12345678");
-        AclSigner.calSignature("RocketMQ".getBytes(),"12345678");
+        String expectedSignature = "IUc8rrO/0gDch8CjObLQsW2rsiA=";
+        Assert.assertEquals(expectedSignature, AclSigner.calSignature("RocketMQ", "12345678"));
+        Assert.assertEquals(expectedSignature, AclSigner.calSignature("RocketMQ".getBytes(), "12345678"));

Review Comment:
   Assert.assertEquals(AclSigner.calSignature("RocketMQ", "12345678"), AclSigner.calSignature("RocketMQ".getBytes(), "12345678"));



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org