#NEWLINE# def test_run_job_wrapper_args( self ) : #NEWLINE# #INDENT# job_configs = { #NEWLINE# #INDENT# 'configs' : { #NEWLINE# #INDENT# 'edp.java.main_class' : 'org.me.myclass' , #NEWLINE# 'edp.spark.adapt_for_swift' : True , #NEWLINE# #UNINDENT# } , #NEWLINE# 'args' : [ 'input_arg' , 'output_arg' ] , #NEWLINE# #UNINDENT# } #NEWLINE# files = { #NEWLINE# #INDENT# 'jars' : [ 'app.jar' ] , #NEWLINE# 'bltns' : [ 'wrapper.jar' ] , #NEWLINE# #UNINDENT# } #NEWLINE# master_instance = self . _make_master_instance ( ) #NEWLINE# status = self . _setup_run_job ( master_instance , status , files ) #NEWLINE# master_instance . execute_command . assert_called_with ( ( 'cd %(workflow_dir)s; ./launch_command %(spark_user)s%(spark_submit)s --driver-class-path %(driver_cp)s --files spark.xml --class org.openstack.sahara.edp.SparkWrapper --jars wrapper.jar --master %(master)s --deploy-mode %(deploy_mode)s app.jar spark.xml org.me.myclass input_arg output_arg > /dev/null 2>&1 & echo $!' % { #NEWLINE# #INDENT# 'workflow_dir' : self . workflow_dir , #NEWLINE# 'spark_user' : self . spark_user , #NEWLINE# 'spark_submit' : self . spark_submit , #NEWLINE# 'driver_cp' : self . driver_cp , #NEWLINE# 'master' : self . master , #NEWLINE# 'deploy_mode' : self . deploy_mode , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# self . assertEqual ( ( ( '%s@%s' % ( self . spark_pid , self . master_inst ) ) , edp . JOB_STATUS_RUNNING , { #NEWLINE# #INDENT# 'spark-path' : self . workflow_dir , #NEWLINE# #UNINDENT# } ) , status )