From a818fbb8e778be54f70479e5fe351a7f6c0b419e Mon Sep 17 00:00:00 2001 From: chinmay-bhat <12948588+chinmay-bhat@users.noreply.github.com> Date: Fri, 22 Dec 2023 11:39:45 +0530 Subject: [PATCH] fix CI errors --- .../apache/iceberg/spark/source/TestChangelogReader.java | 6 +++++- .../iceberg/spark/source/TestIcebergSourceTablesBase.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestChangelogReader.java b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestChangelogReader.java index 248bf742fbdd..52d6ff8c9c8b 100644 --- a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestChangelogReader.java +++ b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestChangelogReader.java @@ -22,6 +22,7 @@ import static org.apache.iceberg.types.Types.NestedField.required; import static org.assertj.core.api.Assertions.assertThat; +import java.io.File; import java.io.IOException; import java.nio.file.Path; import java.util.List; @@ -254,6 +255,9 @@ private Object[] toJava(InternalRow row) { private DataFile writeDataFile(List records) throws IOException { // records all use IDs that are in bucket id_bucket=0 return FileHelpers.writeDataFile( - table, Files.localOutput(temp.resolve("junit").toFile()), TestHelpers.Row.of(0), records); + table, + Files.localOutput(File.createTempFile("junit", null, temp.toFile())), + TestHelpers.Row.of(0), + records); } } diff --git a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestIcebergSourceTablesBase.java b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestIcebergSourceTablesBase.java index d50a401597d2..29ccba5a27c7 100644 --- a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestIcebergSourceTablesBase.java +++ b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestIcebergSourceTablesBase.java @@ -2281,7 +2281,7 @@ private DeleteFile writeEqDeleteFile(Table table) { try { return FileHelpers.writeDeleteFile( table, - Files.localOutput(temp.toFile()), + Files.localOutput(File.createTempFile("junit", null, temp.toFile())), org.apache.iceberg.TestHelpers.Row.of(1), deletes, deleteRowSchema);