File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed 
core/src/test/scala/org/apache/spark/deploy Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -499,12 +499,15 @@ class SparkSubmitSuite
499499      Seq (" ./bin/spark-submit" ++  args,
500500      new  File (sparkHome),
501501      Map (" SPARK_TESTING" ->  " 1" " SPARK_HOME" ->  sparkHome))
502-     val  exitCode  =  failAfter(60  seconds) { process.waitFor() }
503-     //  Ensure we still kill the process in case it timed out
504-     process.destroy()
505-     //  If the process did not return cleanly, fail the test
506-     if  (exitCode !=  0 ) {
507-       fail(s " Process returned with exit code  $exitCode. See the log4j logs for more detail. " )
502+ 
503+     try  {
504+       val  exitCode  =  failAfter(60  seconds) { process.waitFor() }
505+       if  (exitCode !=  0 ) {
506+         fail(s " Process returned with exit code  $exitCode. See the log4j logs for more detail. " )
507+       }
508+     } finally  {
509+       //  Ensure we still kill the process in case it timed out
510+       process.destroy()
508511    }
509512  }
510513
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments