]> go.fuhry.dev Git - fsnotify.git/commitdiff
Actually, just return the first error
authorMartin Tournoij <martin@arp242.net>
Sat, 15 Oct 2022 20:58:27 +0000 (22:58 +0200)
committerMartin Tournoij <martin@arp242.net>
Sat, 15 Oct 2022 20:58:27 +0000 (22:58 +0200)
Now I got thousands of:

    helpers_test.go:384: fsnotify.readEvents: bad file descriptor
    helpers_test.go:384: fsnotify.readEvents: bad file descriptor
    helpers_test.go:384: fsnotify.readEvents: bad file descriptor
    helpers_test.go:384: fsnotify.readEvents: bad file descriptor
    helpers_test.go:384: fsnotify.readEvents: bad file descriptor
    helpers_test.go:384: fsnotify.readEvents: bad file descriptor
    helpers_test.go:384: fsnotify.readEvents: bad file descriptor
    helpers_test.go:384: fsnotify.readEvents: bad file descriptor
    helpers_test.go:384: fsnotify.readEvents: bad file descriptor
    helpers_test.go:384: fsnotify.readEvents: bad file descriptor
    helpers_test.go:384: fsnotify.readEvents: bad file descriptor
    helpers_test.go:384: fsnotify.readEvents: bad file descriptor
    helpers_test.go:384: fsnotify.readEvents: bad file descriptor
    helpers_test.go:384: fsnotify.readEvents: bad file descriptor
    helpers_test.go:384: fsnotify.readEvents: bad file descriptor
    helpers_test.go:384: fsnotify.readEvents: bad file descriptor
    helpers_test.go:384: fsnotify.readEvents: bad file descriptor

That's not helpful.

helpers_test.go

index 7f1de528dd3dc0c3b87072a6f1d4f57db9d63618..00f3bf468811b8c95b9c4746f002a95afd7f9158 100644 (file)
@@ -382,6 +382,8 @@ func (w *eventCollector) collect(t *testing.T) {
                                        return
                                }
                                t.Error(e)
+                               w.done <- struct{}{}
+                               return
                        case e, ok := <-w.w.Events:
                                if !ok {
                                        w.done <- struct{}{}