Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #4098] Method may fail to clean up stream or resource[WatchFileManagerTest] #4573

Closed
wants to merge 2 commits into from

Conversation

NiuXiangQian
Copy link

Fixes #4098.

Modifications

  • Use try-with-resources to close the io stream

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to the Apache EventMesh community!!
This is your first PR in our project. We're very excited to have you onboard contributing. Your contributions are greatly appreciated!

Please make sure that the changes are covered by tests.
We will be here shortly.
Let us know if you need any help!

Want to get closer to the community?

WeChat Assistant WeChat Public Account Slack
Join Slack Chat

Mailing Lists:

Name Description Subscribe Unsubscribe Archive
Users User support and questions mailing list Subscribe Unsubscribe Mail Archives
Development Development related discussions Subscribe Unsubscribe Mail Archives
Commits All commits to repositories Subscribe Unsubscribe Mail Archives
Issues Issues or PRs comments and reviews Subscribe Unsubscribe Mail Archives

@pandaapo pandaapo changed the title [ISSUE #4098] Fix the resource flow may not be closed correctly [ISSUE #4098] Method may fail to clean up stream or resource[WatchFileManagerTest] Nov 23, 2023
Copy link
Member

@pandaapo pandaapo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please prepare a separate file for this unit test, and no longer use configuration.properties. It seems that this method modified the file, which caused another unit test that depends on the file to fail.

@Test
public void testWatchFile() throws IOException, InterruptedException {
String file = WatchFileManagerTest.class.getResource("/configuration.properties").getFile();

@pandaapo
Copy link
Member

Hi, do you plan to continue fixing this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Method may fail to clean up stream or resource[WatchFileManagerTest]
2 participants