#NEWLINE# def testSliceRecoveryWithNoFlushing( self ) : #NEWLINE# #INDENT# mr_id = control . start_map ( 'test_map' , ( __name__ + '.FaultyHandler' ) , ( input_readers . __name__ + '.DatastoreInputReader' ) , { #NEWLINE# #INDENT# 'input_reader' : { #NEWLINE# #INDENT# 'entity_kind' : ( ( __name__ + '.' ) + TestEntity . __name__ ) , #NEWLINE# #UNINDENT# } , #NEWLINE# 'output_writer' : { #NEWLINE# #INDENT# 'bucket_name' : 'bucket' , #NEWLINE# 'no_duplicate' : True , #NEWLINE# #UNINDENT# } , #NEWLINE# 'processing_rate' : self . processing_rate , #NEWLINE# #UNINDENT# } , output_writer_spec = ( output_writers . __name__ + '._GoogleCloudStorageOutputWriter' ) , shard_count = 1 ) #NEWLINE# test_support . execute_until_empty ( self . taskqueue ) #NEWLINE# mr_state = model . MapreduceState . get_by_job_id ( seg_prefix ) #NEWLINE# self . assertEqual ( model . MapreduceState . RESULT_SUCCESS , mr_state . result_status ) #NEWLINE# shard_state = model . ShardState . find_all_by_mapreduce_state ( mr_state ) . next ( ) #NEWLINE# writer_state = shard_state . writer_state #NEWLINE# last_seg_index = writer_state [ self . writer_cls . _LAST_SEG_INDEX ] #NEWLINE# seg_prefix = writer_state [ self . writer_cls . _SEG_PREFIX ] #NEWLINE# self . assertEqual ( 4 , last_seg_index ) #NEWLINE# self . _assertOutputEqual ( seg_prefix , last_seg_index )