chia7712 commented on code in PR #15808:
URL: https://github.com/apache/kafka/pull/15808#discussion_r1582280178


##########
core/src/test/scala/unit/kafka/utils/TestUtils.scala:
##########
@@ -1124,24 +933,18 @@ object TestUtils extends Logging {
     }, msg = msg, pause = 0L, waitTimeMs = waitTimeMs)
   }
 
-  /**
-   * Wait for the presence of an optional value.
-   *
-   * @param func The function defining the optional value
-   * @param msg Error message in the case that the value never appears
-   * @param waitTimeMs Maximum time to wait
-   * @return The unwrapped value returned by the function
-   */
-  def awaitValue[T](func: () => Option[T], msg: => String, waitTimeMs: Long = 
JTestUtils.DEFAULT_MAX_WAIT_MS): T = {
-    var value: Option[T] = None
-    waitUntilTrue(() => {
-      value = func()
-      value.isDefined
-    }, msg, waitTimeMs)
-    value.get
+  def subscribeAndWaitForRecords(topic: String,

Review Comment:
   why adding this new method? it is unused.



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to