You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "aoli-al (via GitHub)" <gi...@apache.org> on 2025/01/20 19:23:38 UTC
[PR] [FLINK-37182][tests] Remove temp partition files created during test. [flink]
aoli-al opened a new pull request, #26025:
URL: https://github.com/apache/flink/pull/26025
<!--
*Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
*Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
**(The sections below can be removed for hotfixes of typos)**
-->
## What is the purpose of the change
This PR improves the `PartitionedFileWriteReadTest`. The test now removes partition files after it finishes.
## Brief change log
- Call `partitionedFile.deleteQuietly();` after test finishes.
## Verifying this change
Please make sure both new and modified tests in this PR follow [the conventions for tests defined in our code quality guide](https://flink.apache.org/how-to-contribute/code-style-and-quality-common/#7-testing).
With the patch I confirm that the partition files are removed.
## Does this pull request potentially affect one of the following parts:
This PR only contains test changes.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37182][tests] Remove temp partition files created during test. [flink]
Posted by "JunRuiLee (via GitHub)" <gi...@apache.org>.
JunRuiLee commented on code in PR #26025:
URL: https://github.com/apache/flink/pull/26025#discussion_r1923096609
##########
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/PartitionedFileWriteReadTest.java:
##########
@@ -755,7 +762,7 @@ private PartitionedFileWriter createPartitionedFileWriter(
private PartitionedFileWriter createAndFinishPartitionedFileWriter() throws IOException {
PartitionedFileWriter partitionedFileWriter = createPartitionedFileWriter(1, new int[0]);
- partitionedFileWriter.finish();
+ partitionedFileWriter.finish().deleteQuietly();
Review Comment:
If it's not very straightforward to implement this, I would prefer to introduce a property PartitionedFile partitionedFile, and have each case assign a value to it. Then, delete it in the AfterEach method.
For example:
```
private PartitionedFile partitionedFile;
@AfterEach
void after() {
partitionedFile.deleteQuietly();
}
```
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37182][tests] Remove temp partition files created during test. [flink]
Posted by "JunRuiLee (via GitHub)" <gi...@apache.org>.
JunRuiLee merged PR #26025:
URL: https://github.com/apache/flink/pull/26025
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37182][tests] Remove temp partition files created during test. [flink]
Posted by "JunRuiLee (via GitHub)" <gi...@apache.org>.
JunRuiLee commented on PR #26025:
URL: https://github.com/apache/flink/pull/26025#issuecomment-2606139486
🤦♂️ It seems I've encountered a bug on GitHub. I merged the squashed commit, but the result was that the two commits before squashing were merged into the master. 😓
But it's okay; it doesn't really matter.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37182][tests] Remove temp partition files created during test. [flink]
Posted by "JunRuiLee (via GitHub)" <gi...@apache.org>.
JunRuiLee commented on code in PR #26025:
URL: https://github.com/apache/flink/pull/26025#discussion_r1923081150
##########
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/PartitionedFileWriteReadTest.java:
##########
@@ -755,7 +762,7 @@ private PartitionedFileWriter createPartitionedFileWriter(
private PartitionedFileWriter createAndFinishPartitionedFileWriter() throws IOException {
PartitionedFileWriter partitionedFileWriter = createPartitionedFileWriter(1, new int[0]);
- partitionedFileWriter.finish();
+ partitionedFileWriter.finish().deleteQuietly();
Review Comment:
I think we should delete the partitioned file after the test finishes instead of at the beginning. How about make this change at the end of `testFinishPartitionedFileWriterTwice()` and `testWriteFinishedPartitionedFile()`?
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37182][tests] Remove temp partition files created during test. [flink]
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #26025:
URL: https://github.com/apache/flink/pull/26025#issuecomment-2603249654
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "f3133493cff77165cbabe39919f8c1aaf0e0e0a5",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "f3133493cff77165cbabe39919f8c1aaf0e0e0a5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* f3133493cff77165cbabe39919f8c1aaf0e0e0a5 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org