chia7712 commented on code in PR #16330:
URL: https://github.com/apache/kafka/pull/16330#discussion_r1639268606
##########
connect/runtime/src/test/java/org/apache/kafka/connect/integration/ConnectIntegrationTestUtils.java:
##########
@@ -16,28 +16,26 @@
*/
package org.apache.kafka.connect.integration;
-import org.junit.rules.TestRule;
-import org.junit.rules.TestWatcher;
-import org.junit.runner.Description;
+import org.junit.jupiter.api.extension.AfterEachCallback;
+import org.junit.jupiter.api.extension.BeforeEachCallback;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.TestWatcher;
import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* A utility class for Connect's integration tests
*/
-public class ConnectIntegrationTestUtils {
- public static TestRule newTestWatcher(Logger log) {
- return new TestWatcher() {
- @Override
- protected void starting(Description description) {
- super.starting(description);
- log.info("Starting test {}", description.getMethodName());
- }
+public class ConnectIntegrationTestUtils implements TestWatcher,
BeforeEachCallback, AfterEachCallback {
Review Comment:
It seems this is used to log test name. Maybe we can move the log to each
tests? There are only three class using this helper.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]