#NEWLINE# def testTransientFailure( self ) : #NEWLINE# #INDENT# 'Test op that fails once and then succeeds.' #NEWLINE# def _FlakyOpMethod( client , callback ) : #NEWLINE# #INDENT# self . _method_count += 1 #NEWLINE# if ( self . _method_count == 1 ) : #NEWLINE# #INDENT# raise Exception ( 'some transient failure' ) #NEWLINE# #UNINDENT# callback ( ) #NEWLINE# #UNINDENT# self . _ExecuteOp ( user_id = 1 , handler = _FlakyOpMethod , wait_for_op = False ) #NEWLINE# self . assertEqual ( self . _method_count , 2 )