Skip to content

Commit

Permalink
Don't clear events in reset()
Browse files Browse the repository at this point in the history
We already drain the events in pollEvents. Clearing in reset() can cause
events to be missed (which manifested as flaky tests).
  • Loading branch information
eatkins committed May 10, 2018
1 parent c7b813a commit 70b4c74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion io/src/main/scala/sbt/io/MacOSXWatchService.scala
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private class MacOSXWatchKey(val watchable: JPath, queueSize: Int, kinds: WatchE
Collections.unmodifiableList(result)
}

override def reset(): Boolean = { events.clear(); true }
override def reset(): Boolean = true

override def toString = s"MacOSXWatchKey($watchable)"

Expand Down

0 comments on commit 70b4c74

Please sign in to comment.