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


##########
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:
   `assertBadConfigContainingMessage` this method are used by two classes, so I 
didn't move it. 
   The `kafka.KafkaConfigTest` and `server.KafkaConfigTest` are using it 



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