MCPcopy
hub / github.com/docker/compose / rebuildWatcher

Method rebuildWatcher

pkg/watch/notify_test.go:521–538  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

519}
520
521func (f *notifyFixture) rebuildWatcher() {
522 // sync any outstanding events and close the old watcher
523 if f.notify != nil {
524 f.fsync()
525 f.closeWatcher()
526 }
527
528 // create a new watcher
529 notify, err := NewWatcher(f.paths)
530 if err != nil {
531 f.T().Fatal(err)
532 }
533 f.notify = notify
534 err = f.notify.Start()
535 if err != nil {
536 f.T().Fatal(err)
537 }
538}
539
540func (f *notifyFixture) assertEvents(expected ...string) {
541 f.fsync()

Callers 2

watchMethod · 0.95
TestNoWatchesFunction · 0.80

Calls 5

fsyncMethod · 0.95
closeWatcherMethod · 0.95
TMethod · 0.80
NewWatcherFunction · 0.70
StartMethod · 0.65

Tested by

no test coverage detected