func (*WorkerSuite) TestDeadAlready(c *gc.C) { w := workertest.NewDeadWorker(nil) select { case _, ok := <-worker.Dead(w): c.Check(ok, jc.IsFalse) case <-time.After(coretesting.LongWait): c.Fatalf("Dead never sent") } }
func (s *Suite) TestCheckAliveFailure(c *gc.C) { w := workertest.NewDeadWorker(nil) workertest.CheckAlive(c, w) s.CheckFailed(c) }
func (*WorkerSuite) TestStopReturnsError(c *gc.C) { w := workertest.NewDeadWorker(errors.New("pow")) err := worker.Stop(w) c.Check(err, gc.ErrorMatches, "pow") }
func (*WorkerSuite) TestStopReturnsNoError(c *gc.C) { w := workertest.NewDeadWorker(nil) err := worker.Stop(w) c.Check(err, jc.ErrorIsNil) }