Skip to content

Commit

Permalink
fix watcher api errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Wiesmueller committed Sep 11, 2018
1 parent 1779a50 commit f395876
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/watcher/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (w *Watcher) Start(ctx context.Context) error {
})

w.Process.SetOut(stderr, stdout)
w.Tomb.Go(w.Process.Start)
w.Tomb.Go(w.Process.Run)
w.Tomb.Go(func() error {
w.TLock.RLock()
defer w.TLock.RUnlock()
Expand Down
4 changes: 2 additions & 2 deletions pkg/watcher/watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ var _ = Describe("Watcher", func() {
It("does start process", func() {
w.Start(ctx)
time.Sleep(100 * time.Millisecond)
Expect(p.StartCallCount()).To(BeEquivalentTo(1))
Expect(p.RunCallCount()).To(BeEquivalentTo(1))
})
It("does end OutputHandlers on tomb dying", func() {
p.StartReturns(nil)
p.RunReturns(nil)
w.Start(ctx)
time.Sleep(100 * time.Millisecond)
w.TLock.RLock()
Expand Down

0 comments on commit f395876

Please sign in to comment.