-
Notifications
You must be signed in to change notification settings - Fork 326
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
Disable file watcher in VcsManagerTest suite #7421
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My wish is to cleanup the dependencies of our project. I believe there should be API (e.g. Watcher
) visible to the rest of the code base, but the implementation should be in a different project.
My other wish: new files (Watcher
, Watcher.Factory
) would better be written in Java.
|
||
import java.nio.file.Path | ||
|
||
trait Watcher { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is a nice opportunity to separate API (e.g. Watcher
) from the implementation and have them in different projects.
errorCallback: WatcherAdapter.WatcherError => Unit | ||
) extends DirectoryChangeListener { | ||
|
||
import WatcherAdapter._ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test shouldn't even see this class and definitely not io.methvin.watcher
classes on the classpath!
|
||
import java.nio.file.Path | ||
|
||
trait WatcherFactory { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd make the WatcherFactory
an inner class of Watcher
if I was designing the API in Java.
Pull Request Description
We can't really control the timing of file watcher events, which sometimes leads to failures of VCS tests. The PR disables the file watcher in the
VcsManagerTest
suite to make tests more stable.Changelog:
Watcher
andWatcherFactory
interfacesNoopWatcher
test watcherVcsManagerTest
suiteImportant Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.