You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2021/09/20 08:38:35 UTC
[flink] 01/02: [hotfix][test] Derive expected files from
getFilesToUpload
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch release-1.14
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 6f2fa53635007135462d2f151937f6155e0bcfdc
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Thu Sep 9 16:51:00 2021 +0200
[hotfix][test] Derive expected files from getFilesToUpload
This simplifies debugging if the number of files is modified.
---
.../java/org/apache/flink/runtime/rest/MultipartUploadResource.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/MultipartUploadResource.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/MultipartUploadResource.java
index 9e5e4d7..2cd6ecf 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/MultipartUploadResource.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/MultipartUploadResource.java
@@ -135,7 +135,10 @@ public class MultipartUploadResource extends ExternalResource {
(request, restfulGateway) -> {
// the default verifier checks for identiy (i.e. same name and content) of all
// uploaded files
- List<Path> expectedFiles = Arrays.asList(file1.toPath(), file2.toPath());
+ List<Path> expectedFiles =
+ getFilesToUpload().stream()
+ .map(File::toPath)
+ .collect(Collectors.toList());
List<Path> uploadedFiles =
request.getUploadedFiles().stream()
.map(File::toPath)