#NEWLINE# def test_uninstall_lost_host( self ) : #NEWLINE# #INDENT# self . setup_cluster ( NoHadoopBareImageProvider ( ) , self . PA_ONLY_CLUSTER ) #NEWLINE# pa_installer = PrestoadminInstaller ( self ) #NEWLINE# pa_installer . install ( ) #NEWLINE# topology = { #NEWLINE# #INDENT# 'coordinator' : self . cluster . internal_slaves [ 0 ] , #NEWLINE# 'workers' : [ self . cluster . internal_master , self . cluster . internal_slaves [ 1 ] , self . cluster . internal_slaves [ 2 ] ] , #NEWLINE# #UNINDENT# } #NEWLINE# self . upload_topology ( topology ) #NEWLINE# self . installer . install ( ) #NEWLINE# start_output = self . run_prestoadmin ( 'server start' ) #NEWLINE# process_per_host = self . get_process_per_host ( start_output . splitlines ( ) ) #NEWLINE# self . assert_started ( process_per_host ) #NEWLINE# down_node = self . cluster . internal_slaves [ 0 ] #NEWLINE# self . cluster . stop_host ( self . cluster . slaves [ 0 ] ) #NEWLINE# expected = self . down_node_connection_error ( self . cluster . internal_slaves [ 0 ] ) #NEWLINE# cmd_output = self . run_prestoadmin ( 'server uninstall' , raise_error = False ) #NEWLINE# self . assertRegexpMatches ( cmd_output , expected ) #NEWLINE# process_per_active_host = [ ] #NEWLINE# for ( host , pid ) in process_per_host : #NEWLINE# #INDENT# if ( host not in down_node ) : #NEWLINE# #INDENT# process_per_active_host . append ( ( host , pid ) ) #NEWLINE# #UNINDENT# #UNINDENT# self . assert_stopped ( process_per_active_host ) #NEWLINE# for container in [ self . cluster . internal_master , self . cluster . internal_slaves [ 1 ] , self . cluster . internal_slaves [ 2 ] ] : #NEWLINE# #INDENT# self . assert_uninstalled_dirs_removed ( container )