cfmcgrady commented on code in PR #2086:
URL: 
https://github.com/apache/incubator-celeborn/pull/2086#discussion_r1388779635


##########
common/src/test/scala/org/apache/celeborn/common/meta/WorkerInfoSuite.scala:
##########
@@ -303,4 +303,34 @@ class WorkerInfoSuite extends CelebornFunSuite {
       }
     }
   }
+
+  test("Test WorkerInfo hashcode") {
+    val host = "127.0.0.1"
+    val rpcPort = 9082
+    val pushPort = 9092
+    val fetchPort = 9093
+    val replicatePort = 9094
+    val workerInfo = new WorkerInfo(host, rpcPort, pushPort, fetchPort, 
replicatePort)
+
+    // origin hashCode()
+    var now = System.nanoTime()
+    val state = Seq(host, rpcPort, pushPort, fetchPort, replicatePort)
+    val originHash = state.map(_.hashCode()).foldLeft(0)((a, b) => 31 * a + b)
+    var after = System.nanoTime()
+    println("WorkerInfo origin hash result = " + originHash + ", costs " + 
(after - now))

Review Comment:
   avoid call `println` in UTs



-- 
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