def testSliceRecoveryFailed(self):
    self.init(output_writer_spec=__name__ + ".TestOutputWriter")
    def _raise(self):
      raise Exception("Raise an exception on intention.")
    TestOutputWriter._supports_slice_recovery = _raise

    shard_state = model.ShardState.get_by_shard_id(self.shard_id)
    # This slice had acquired shard lock in previous attempt.
    shard_state.acquired_once = True
    shard_state.put()

    self.handler.post()
    # Slice gets retried.
    self.assertEqual(httplib.SERVICE_UNAVAILABLE, self.handler.response.status)
    self.verify_shard_state(
        model.ShardState.get_by_shard_id(self.shard_id),
        active=True,
        result_status=None,
        slice_retries=1)
An example target used by the relay.mesos demo to set the target number of
dataset/ETHPy150Open GoogleCloudPlatform/appengine-mapreduce/python/test/mapreduce/handlers_test.py/MapperWorkerCallbackHandlerTest.testSliceRecoveryFailed--crossover with--dataset/ETHPy150Open sailthru/relay.mesos/relay_mesos/for_demo.py/target_value