chia7712 commented on a change in pull request #9435:
URL: https://github.com/apache/kafka/pull/9435#discussion_r529240711



##########
File path: core/src/test/scala/unit/kafka/server/KafkaApisTest.scala
##########
@@ -107,6 +108,11 @@ class KafkaApisTest {
   private val time = new MockTime
   private val clientId = ""
 
+  @Before
+  def setUp(): Unit = {

Review comment:
       It seems to me following code is able to generate a clean, uncorrupted 
```MetadataCache``` for each test case.
   
   ```
   var metadataCache = new MetadataCache(brokerId)
   ```
   
   Also, it is simpler than ```@Before``` block.




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

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


Reply via email to