Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
import org.apache.spark.sql.SQLContext;
import org.apache.spark.sql.SparkSession;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.io.TempDir;

Expand Down Expand Up @@ -96,6 +97,7 @@ public class SparkClientFunctionalTestHarness implements SparkProvider, HoodieMe
private static transient JavaSparkContext jsc;
private static transient HoodieSparkEngineContext context;
private static transient TimelineService timelineService;
private FileSystem fileSystem;

/**
* An indicator of the initialization status.
Expand Down Expand Up @@ -128,7 +130,10 @@ public Configuration hadoopConf() {
}

public FileSystem fs() {
return FSUtils.getFs(basePath(), hadoopConf());
if (fileSystem == null) {
fileSystem = FSUtils.getFs(basePath(), hadoopConf());
}
return fileSystem;
}

@Override
Expand Down Expand Up @@ -208,6 +213,13 @@ public static synchronized void resetSpark() {
}
}

@AfterEach
public void closeFilesystem() throws IOException {
if (fileSystem != null) {
fileSystem.close();
}
}

protected JavaRDD<HoodieRecord> tagLocation(
HoodieIndex index, JavaRDD<HoodieRecord> records, HoodieTable table) {
return HoodieJavaRDD.getJavaRDD(
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@
<glassfish.version>2.17</glassfish.version>
<glassfish.el.version>3.0.1-b12</glassfish.el.version>
<parquet.version>1.10.1</parquet.version>
<junit.jupiter.version>5.7.2</junit.jupiter.version>
<junit.vintage.version>5.7.2</junit.vintage.version>
<junit.jupiter.version>5.8.2</junit.jupiter.version>
<junit.vintage.version>5.8.2</junit.vintage.version>
<junit.platform.version>1.7.2</junit.platform.version>
<mockito.jupiter.version>3.3.3</mockito.jupiter.version>
<log4j.test.version>2.17.2</log4j.test.version>
Expand Down