@@ -92,6 +92,7 @@ def run_individual_python_test(target_dir, test_name, pyspark_python):
92
92
"--conf" , "spark.executor.extraJavaOptions=-Djava.io.tmpdir={0}" .format (tmp_dir ),
93
93
"pyspark-shell"
94
94
]
95
+
95
96
env ["PYSPARK_SUBMIT_ARGS" ] = " " .join (spark_args )
96
97
LOGGER .info ("Starting test(%s): %s" , pyspark_python , test_name )
97
98
start_time = time .time ()
@@ -102,8 +103,7 @@ def run_individual_python_test(target_dir, test_name, pyspark_python):
102
103
stderr = per_test_output , stdout = per_test_output , env = env ).wait ()
103
104
shutil .rmtree (tmp_dir , ignore_errors = True )
104
105
except :
105
- LOGGER .exception (
106
- "Got exception while running %s with %s" , test_name , pyspark_python )
106
+ LOGGER .exception ("Got exception while running %s with %s" , test_name , pyspark_python )
107
107
# Here, we use os._exit() instead of sys.exit() in order to force Python to exit even if
108
108
# this code is invoked from a thread other than the main thread.
109
109
os ._exit (1 )
@@ -124,8 +124,7 @@ def run_individual_python_test(target_dir, test_name, pyspark_python):
124
124
except :
125
125
LOGGER .exception ("Got an exception while trying to print failed test output" )
126
126
finally :
127
- print_red ("\n Had test failures in %s with %s; see logs." % (
128
- test_name , pyspark_python ))
127
+ print_red ("\n Had test failures in %s with %s; see logs." % (test_name , pyspark_python ))
129
128
# Here, we use os._exit() instead of sys.exit() in order to force Python to exit even if
130
129
# this code is invoked from a thread other than the main thread.
131
130
os ._exit (- 1 )
@@ -153,8 +152,8 @@ def run_individual_python_test(target_dir, test_name, pyspark_python):
153
152
os ._exit (- 1 )
154
153
if skipped_counts != 0 :
155
154
LOGGER .info (
156
- "Finished test(%s): %s (%is) ... %s tests were skipped" , pyspark_python ,
157
- test_name , duration , skipped_counts )
155
+ "Finished test(%s): %s (%is) ... %s tests were skipped" , pyspark_python , test_name ,
156
+ duration , skipped_counts )
158
157
else :
159
158
LOGGER .info (
160
159
"Finished test(%s): %s (%is)" , pyspark_python , test_name , duration )
0 commit comments