stevenzwu commented on a change in pull request #1956:
URL: https://github.com/apache/iceberg/pull/1956#discussion_r549934468



##########
File path: 
flink/src/test/java/org/apache/iceberg/flink/sink/TestFlinkIcebergSink.java
##########
@@ -46,21 +49,36 @@
 import org.apache.iceberg.relocated.com.google.common.collect.Lists;
 import org.junit.Assert;
 import org.junit.Before;
-import org.junit.Rule;
+import org.junit.ClassRule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
 @RunWith(Parameterized.class)
-public class TestFlinkIcebergSink extends AbstractTestBase {
+public class TestFlinkIcebergSink extends TestBaseUtils {
   private static final TypeInformation<Row> ROW_TYPE_INFO = new RowTypeInfo(
       SimpleDataUtil.FLINK_SCHEMA.getFieldTypes());
   private static final DataFormatConverters.RowConverter CONVERTER = new 
DataFormatConverters.RowConverter(
       SimpleDataUtil.FLINK_SCHEMA.getFieldDataTypes());
 
-  @Rule
-  public TemporaryFolder tempFolder = new TemporaryFolder();
+  private static final int DEFAULT_PARALLELISM = 4;
+
+  private static final org.apache.flink.configuration.Configuration config =
+      new org.apache.flink.configuration.Configuration()
+          // disable classloader check as Avro may cache class/object in the 
serializers.
+          .set(CoreOptions.CHECK_LEAKED_CLASSLOADER, false);
+
+  @ClassRule
+  public static MiniClusterWithClientResource miniClusterResource = new 
MiniClusterWithClientResource(
+      new MiniClusterResourceConfiguration.Builder()
+          .setNumberTaskManagers(1)

Review comment:
       it seems that most Flink unit test with MiniCluster are using one 
taskmanager. I would stick with the convention.
   
   On the other hand, this code is added to disable `CHECK_LEAKED_CLASSLOADER`. 
If we can fix that problem, we can stick with the `AbstractTestBase` base class




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to