func (s *resolverSuite) TestRunHookStopRetryTimer(c *gc.C) { s.reportHookError = func(hook.Info) error { return nil } localState := resolver.LocalState{ CharmModifiedVersion: s.charmModifiedVersion, CharmURL: s.charmURL, State: operation.State{ Kind: operation.RunHook, Step: operation.Pending, Installed: true, Started: true, Hook: &hook.Info{ Kind: hooks.ConfigChanged, }, }, } _, err := s.resolver.NextOp(localState, s.remoteState, s.opFactory) c.Assert(err, gc.Equals, resolver.ErrNoOperation) s.stub.CheckCallNames(c, "StartRetryHookTimer") localState.Kind = operation.Continue _, err = s.resolver.NextOp(localState, s.remoteState, s.opFactory) c.Assert(err, gc.Equals, resolver.ErrNoOperation) s.stub.CheckCallNames(c, "StartRetryHookTimer", "StopRetryHookTimer") }