Temporarily disable the shaky test. (#78)

Ref https://github.com/luna/enso/issues/73
This commit is contained in:
Michał Wawrzyniec Urbańczyk 2019-08-08 12:46:02 +02:00 committed by GitHub
parent d2e16c3e1f
commit 28da85efc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,16 +60,14 @@ class WatchTests
def matchesEvent( def matchesEvent(
path: Path, path: Path,
eventType: DirectoryChangeEvent.EventType eventType: DirectoryChangeEvent.EventType
)(message: FileSystemEvent )(message: FileSystemEvent): Boolean = {
): Boolean = {
message.path == path && message.eventType == eventType message.path == path && message.eventType == eventType
} }
def expectEventFor( def expectEventFor(
eventType: DirectoryChangeEvent.EventType, eventType: DirectoryChangeEvent.EventType,
events: Seq[FileSystemEvent] events: Seq[FileSystemEvent]
)(path: Path )(path: Path): Unit = {
): Unit = {
assert( assert(
events.exists(matchesEvent(path, eventType)), events.exists(matchesEvent(path, eventType)),
s"not received message about $path" s"not received message about $path"
@ -107,25 +105,28 @@ class WatchTests
Await.result(futureResponse, timeout.duration).get Await.result(futureResponse, timeout.duration).get
} }
test("Watcher: observe subtree creation and deletion") { // FIXME [MWU]
val subtree = createSubtree() // This test has been temporarily disabled because it was failing from time
val events = testProbe.receiveMessages(subtree.elements.size) // to time on CI runs: https://github.com/luna/enso/issues/73
subtree.elements.foreach( // test("Watcher: observe subtree creation and deletion") {
expectEventFor(DirectoryChangeEvent.EventType.CREATE, events) // val subtree = createSubtree()
) // val events = testProbe.receiveMessages(subtree.elements.size)
// subtree.elements.foreach(
FileUtils.deleteDirectory(subtree.root.toFile) // expectEventFor(DirectoryChangeEvent.EventType.CREATE, events)
// )
val deletionEvents = testProbe.receiveMessages(subtree.elements.size) //
subtree.elements.foreach( // FileUtils.deleteDirectory(subtree.root.toFile)
expectEventFor( //
DirectoryChangeEvent.EventType.DELETE, // val deletionEvents = testProbe.receiveMessages(subtree.elements.size)
deletionEvents // subtree.elements.foreach(
) // expectEventFor(
) // DirectoryChangeEvent.EventType.DELETE,
// deletionEvents
testProbe.expectNoMessage(50.millis) // )
} // )
//
// testProbe.expectNoMessage(50.millis)
// }
test("Watcher: observe file modification") { test("Watcher: observe file modification") {
val dir10 = tempDir.resolve("dir10") val dir10 = tempDir.resolve("dir10")