mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 17:03:32 +03:00
Temporarily disable the shaky test. (#78)
Ref https://github.com/luna/enso/issues/73
This commit is contained in:
parent
d2e16c3e1f
commit
28da85efc4
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user