-
Notifications
You must be signed in to change notification settings - Fork 635
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
[Bug] WatchFileManagerTest unit test failed #4711
Labels
bug
Something isn't working
Comments
pandaapo
pushed a commit
that referenced
this issue
Jan 10, 2024
…4716) * Properly close resources used by WatchFileManagerTest * Create WatchService without try-with-resources The WatchService was being prematurely auto-closed, resulting in ClosedWatchService exceptions * Restructure WatchFileManagerTest.testWatchFile to assert the file change event is detected * Load properties file prior to creating FileWriter in WatchFileManagerTest This change ensures the properties in tempConfigFile are loaded into the properties object before the tempConfigFile is cleared by creating the new FileWriter * Verify onChange is called at least once Depending on when the WatchService begins monitoring for file changes, it is possible that creating the new FileWriter, which clears the provided file, will trigger an onChange call, in addition to the onChange call triggered by properties.store(). * Close WatchService in WatchFileTask.shutdown()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Search before asking
Environment
Windows
EventMesh version
master
What happened
Unit test failed.
How to reproduce
Execute the
test
task of theeventmesh-common
module in the Gradle sidebar of IDEA.Debug logs
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: