Browse Source

MINOR: Remove unnecessary assertDoesNotThrow (#9854)

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
pull/9886/head
Geordie 4 years ago committed by GitHub
parent
commit
1ad7cea1d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      log4j-appender/src/test/java/org/apache/kafka/log4jappender/KafkaLog4jAppenderTest.java

5
log4j-appender/src/test/java/org/apache/kafka/log4jappender/KafkaLog4jAppenderTest.java

@ -36,7 +36,6 @@ import java.util.concurrent.ExecutionException; @@ -36,7 +36,6 @@ import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeoutException;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
@ -140,7 +139,7 @@ public class KafkaLog4jAppenderTest { @@ -140,7 +139,7 @@ public class KafkaLog4jAppenderTest {
MockKafkaLog4jAppender mockKafkaLog4jAppender = getMockKafkaLog4jAppender();
replaceProducerWithMocked(mockKafkaLog4jAppender, true);
assertDoesNotThrow(() -> logger.error(getMessage(0)));
logger.error(getMessage(0));
}
@Test
@ -148,7 +147,7 @@ public class KafkaLog4jAppenderTest { @@ -148,7 +147,7 @@ public class KafkaLog4jAppenderTest {
Properties props = getLog4jConfigWithRealProducer(true);
PropertyConfigurator.configure(props);
assertDoesNotThrow(() -> logger.error(getMessage(0)));
logger.error(getMessage(0));
}
@Test

Loading…
Cancel
Save