ijuma commented on a change in pull request #4090:
URL: https://github.com/apache/kafka/pull/4090#discussion_r460711206
##########
File path: core/src/test/scala/unit/kafka/utils/JsonTest.scala
##########
@@ -41,14 +42,23 @@ class JsonTest {
val jnf = JsonNodeFactory.instance
assertEquals(Json.parseFull("{}"), Some(JsonValue(new ObjectNode(jnf))))
+ assertEquals(Json.tryParseFull("{}"), Right(JsonValue(new
ObjectNode(jnf))))
+ org.junit.Assert.assertThrows(classOf[IllegalArgumentException], () =>
Json.tryParseFull(null))
+ org.junit.Assert.assertThrows(classOf[IllegalArgumentException], () =>
Json.tryParseBytes(null))
Review comment:
Why can't we just say `assertThrows` here?
##########
File path: core/src/test/scala/unit/kafka/admin/ReassignPartitionsUnitTest.scala
##########
@@ -30,7 +30,7 @@ import org.apache.kafka.common.{Node, TopicPartition,
TopicPartitionInfo, TopicP
import org.junit.Assert.{assertEquals, assertFalse, assertThrows, assertTrue}
import org.junit.function.ThrowingRunnable
import org.junit.rules.Timeout
-import org.junit.{After, Assert, Before, Rule, Test}
+import org.junit._
Review comment:
We should not use a wildcard imports here.
----------------------------------------------------------------
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:
[email protected]