This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 413194c287 [test] fix failed test in SparkWriteITCase (#5827)
413194c287 is described below
commit 413194c287e95edb1c920e573e27e239c8108da2
Author: askwang <[email protected]>
AuthorDate: Fri Jul 11 13:42:44 2025 +0800
[test] fix failed test in SparkWriteITCase (#5827)
---
.../test/java/org/apache/paimon/spark/SparkWriteITCase.java | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git
a/paimon-spark/paimon-spark-ut/src/test/java/org/apache/paimon/spark/SparkWriteITCase.java
b/paimon-spark/paimon-spark-ut/src/test/java/org/apache/paimon/spark/SparkWriteITCase.java
index b39e44fc6f..6b1b797b24 100644
---
a/paimon-spark/paimon-spark-ut/src/test/java/org/apache/paimon/spark/SparkWriteITCase.java
+++
b/paimon-spark/paimon-spark-ut/src/test/java/org/apache/paimon/spark/SparkWriteITCase.java
@@ -295,7 +295,7 @@ public class SparkWriteITCase {
rows.stream().map(x ->
x.getString(0)).collect(Collectors.toList());
Assertions.assertEquals(3, fileNames.size());
for (String fileName : fileNames) {
- Assertions.assertTrue(fileName.startsWith("data-"));
+ Assertions.assertTrue(fileName.contains("data-"));
}
}
@@ -316,7 +316,7 @@ public class SparkWriteITCase {
rows.stream().map(x ->
x.getString(0)).collect(Collectors.toList());
Assertions.assertEquals(3, fileNames.size());
for (String fileName : fileNames) {
- Assertions.assertTrue(fileName.startsWith("test-"));
+ Assertions.assertTrue(fileName.contains("test-"));
}
}
@@ -337,7 +337,7 @@ public class SparkWriteITCase {
rows.stream().map(x ->
x.getString(0)).collect(Collectors.toList());
Assertions.assertEquals(3, fileNames.size());
for (String fileName : fileNames) {
- Assertions.assertTrue(fileName.startsWith("test-"));
+ Assertions.assertTrue(fileName.contains("test-"));
}
// reset config, it will affect other tests
@@ -453,7 +453,7 @@ public class SparkWriteITCase {
List<String> files =
Arrays.stream(fileIO.listStatus(new Path(tabLocation,
"bucket-0")))
.map(name -> name.getPath().getName())
- .filter(name -> name.startsWith("changelog-"))
+ .filter(name -> name.contains("changelog-"))
.collect(Collectors.toList());
String defaultExtension = "." + "parquet";
String newExtension = "." + "zstd" + "." + "parquet";
@@ -480,8 +480,6 @@ public class SparkWriteITCase {
}
private long dataFileCount(FileStatus[] files, String filePrefix) {
- return Arrays.stream(files)
- .filter(f -> f.getPath().getName().startsWith(filePrefix))
- .count();
+ return Arrays.stream(files).filter(f ->
f.getPath().getName().contains(filePrefix)).count();
}
}