def testSliceRecoveryNotCalledWithOutputWriter(self):
    self.init(output_writer_spec=__name__ + ".TestOutputWriter")
    TestOutputWriter._supports_slice_recovery = lambda self, spec: False

    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._handle_request()
    self.verify_shard_state(
        model.ShardState.get_by_shard_id(self.shard_id),
        active=False, input_finished=True,
        result_status=model.ShardState.RESULT_SUCCESS)
    self.assertFalse("recover" in TestOutputWriter.events)
Test when output writer doesn't support slice recovery.
dataset/ETHPy150Open GoogleCloudPlatform/appengine-mapreduce/python/test/mapreduce/handlers_test.py/MapperWorkerCallbackHandlerTest.testSliceRecoveryNotCalledWithOutputWriter