// waitRemoved waits for the supplied machine to be removed from state. func (s *CommonProvisionerSuite) waitRemoved(c *gc.C, m *state.Machine) { s.waitMachine(c, m, func() bool { err := m.Refresh() if errors.IsNotFound(err) { return true } c.Assert(err, gc.IsNil) c.Logf("machine %v is still %s", m, m.Life()) return false }) }