'When a sleeping convergence loop gets an update and sees if it should
wake up, if the result is a ``NoOp`` with a shorter remaining
duration the sleep is appropriately shortened.'

def test_shorter_sleep(self):

    loop = self.convergence_iteration(initial_action=NO_OP, later_actions=[NoOp(sleep=timedelta(seconds=17))])
    loop.receive(_ClientStatusUpdate(client=self.make_amp_client([self.local_state]), configuration=self.configuration, state=self.cluster_state))
    [delayed_call] = self.reactor.getDelayedCalls()
    delay = (delayed_call.getTime() - self.reactor.seconds())
    self.assertEqual(delay, 17)
