mxsm commented on code in PR #5711:
URL: https://github.com/apache/rocketmq/pull/5711#discussion_r1050401862


##########
controller/src/test/java/org/apache/rocketmq/controller/impl/controller/impl/manager/ReplicasInfoManagerTest.java:
##########
@@ -150,39 +150,39 @@ public void mockMetaData() {
     }
 
     public void mockHeartbeatDataMasterStillAlive() {
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9000", 1L, 10000000000L, null,
-            1, 3L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9001", 1L, 10000000000L, null,
-            1, 2L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9002", 1L, 10000000000L, null,
-            1, 3L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9000", 1L,10000000000L, null,
+            1, 1L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9001", 1L,10000000000L, null,
+            1, 2L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9002", 1L,10000000000L, null,
+            1, 3L,-1L, 0);
     }
 
     public void mockHeartbeatDataHigherEpoch() {
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9000", 1L, -10000L, null,
-            1, 3L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9001", 1L, 10000000000L, null,
-            1, 2L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9002", 1L, 10000000000L, null,
-            0, 3L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9000", 1L,-10000L, null,
+            1, 3L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9001", 1L,10000000000L, null,
+            1, 2L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9002", 1L,10000000000L, null,
+            0, 3L,-1L, 0);

Review Comment:
   code style needs format



##########
controller/src/test/java/org/apache/rocketmq/controller/impl/controller/impl/manager/ReplicasInfoManagerTest.java:
##########
@@ -150,39 +150,39 @@ public void mockMetaData() {
     }
 
     public void mockHeartbeatDataMasterStillAlive() {
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9000", 1L, 10000000000L, null,
-            1, 3L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9001", 1L, 10000000000L, null,
-            1, 2L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9002", 1L, 10000000000L, null,
-            1, 3L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9000", 1L,10000000000L, null,
+            1, 1L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9001", 1L,10000000000L, null,
+            1, 2L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9002", 1L,10000000000L, null,
+            1, 3L,-1L, 0);
     }
 
     public void mockHeartbeatDataHigherEpoch() {
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9000", 1L, -10000L, null,
-            1, 3L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9001", 1L, 10000000000L, null,
-            1, 2L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9002", 1L, 10000000000L, null,
-            0, 3L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9000", 1L,-10000L, null,
+            1, 3L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9001", 1L,10000000000L, null,
+            1, 2L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9002", 1L,10000000000L, null,
+            0, 3L,-1L, 0);
     }
 
     public void mockHeartbeatDataHigherOffset() {
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9000", 1L, -10000L, null,
-            1, 3L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9001", 1L, 10000000000L, null,
-            1, 2L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9002", 1L, 10000000000L, null,
-            1, 3L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9000", 1L,-10000L, null,
+            1, 3L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9001", 1L,10000000000L, null,
+            1, 2L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9002", 1L,10000000000L, null,
+            1, 3L,-1L, 0);

Review Comment:
   code style needs format



##########
controller/src/test/java/org/apache/rocketmq/controller/impl/controller/impl/manager/ReplicasInfoManagerTest.java:
##########
@@ -150,39 +150,39 @@ public void mockMetaData() {
     }
 
     public void mockHeartbeatDataMasterStillAlive() {
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9000", 1L, 10000000000L, null,
-            1, 3L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9001", 1L, 10000000000L, null,
-            1, 2L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9002", 1L, 10000000000L, null,
-            1, 3L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9000", 1L,10000000000L, null,
+            1, 1L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9001", 1L,10000000000L, null,
+            1, 2L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9002", 1L,10000000000L, null,
+            1, 3L,-1L, 0);

Review Comment:
   code style needs format



##########
controller/src/test/java/org/apache/rocketmq/controller/impl/controller/impl/manager/ReplicasInfoManagerTest.java:
##########
@@ -150,39 +150,39 @@ public void mockMetaData() {
     }
 
     public void mockHeartbeatDataMasterStillAlive() {
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9000", 1L, 10000000000L, null,
-            1, 3L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9001", 1L, 10000000000L, null,
-            1, 2L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9002", 1L, 10000000000L, null,
-            1, 3L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9000", 1L,10000000000L, null,
+            1, 1L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9001", 1L,10000000000L, null,
+            1, 2L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9002", 1L,10000000000L, null,
+            1, 3L,-1L, 0);
     }
 
     public void mockHeartbeatDataHigherEpoch() {
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9000", 1L, -10000L, null,
-            1, 3L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9001", 1L, 10000000000L, null,
-            1, 2L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9002", 1L, 10000000000L, null,
-            0, 3L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9000", 1L,-10000L, null,
+            1, 3L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9001", 1L,10000000000L, null,
+            1, 2L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9002", 1L,10000000000L, null,
+            0, 3L,-1L, 0);
     }
 
     public void mockHeartbeatDataHigherOffset() {
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9000", 1L, -10000L, null,
-            1, 3L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9001", 1L, 10000000000L, null,
-            1, 2L, 0);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9002", 1L, 10000000000L, null,
-            1, 3L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9000", 1L,-10000L, null,
+            1, 3L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9001", 1L,10000000000L, null,
+            1, 2L,-1L, 0);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9002", 1L,10000000000L, null,
+            1, 3L,-1L, 0);
     }
 
     public void mockHeartbeatDataHigherPriority() {
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9000", 1L, -10000L, null,
-            1, 3L, 3);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9001", 1L, 10000000000L, null,
-            1, 3L, 2);
-        this.heartbeatManager.registerBroker("cluster1", "broker1", 
"127.0.0.1:9002", 1L, 10000000000L, null,
-            1, 3L, 1);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9000", 1L,-10000L, null,
+            1, 3L,-1L, 3);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9001", 1L,10000000000L, null,
+            1, 3L,-1L, 2);
+        this.heartbeatManager.onBrokerHeartbeat("cluster1", "broker1", 
"127.0.0.1:9002", 1L,10000000000L, null,
+            1, 3L,-1L, 1);

Review Comment:
   code style needs format



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to