You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/05/04 15:54:46 UTC
[GitHub] [incubator-hudi] xushiyan commented on a change in pull request #1590: [HUDI-812] Migrate hudi common tests to JUnit 5
xushiyan commented on a change in pull request #1590:
URL: https://github.com/apache/incubator-hudi/pull/1590#discussion_r419227760
##########
File path: hudi-common/src/test/java/org/apache/hudi/common/fs/TestFSUtils.java
##########
@@ -18,25 +18,25 @@
package org.apache.hudi.common.fs;
-import org.apache.hudi.common.HoodieCommonTestHarness;
import org.apache.hudi.common.model.HoodieLogFile;
import org.apache.hudi.common.model.HoodieTestUtils;
import org.apache.hudi.common.table.HoodieTableMetaClient;
import org.apache.hudi.common.table.timeline.HoodieInstant;
import org.apache.hudi.common.table.timeline.HoodieTimeline;
+import org.apache.hudi.common.testutils.HoodieCommonTestHarness;
import org.apache.hudi.exception.HoodieException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
-import org.junit.Assert;
-import org.junit.Before;
import org.junit.Rule;
-import org.junit.Test;
import org.junit.contrib.java.lang.system.EnvironmentVariables;
Review comment:
["system-rules"](https://stefanbirkner.github.io/system-rules/) is the only Junit 4 extension needed for setting env vars to run a test case in this class. It works fine with Junit 5. Hence these 2 imports ( org.junit.Rule and org.junit.contrib.*) are still here. Also exclude this in checkstyle.xml
##########
File path: hudi-hive-sync/src/test/java/org/apache/hudi/hive/TestUtil.java
##########
@@ -59,7 +59,7 @@
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
-import org.junit.runners.model.InitializationError;
+import org.junit.platform.commons.JUnitException;
Review comment:
Change to a RuntimeException in Junit 5
----------------------------------------------------------------
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:
users@infra.apache.org