gaogaotiantian commented on code in PR #56755:
URL: https://github.com/apache/spark/pull/56755#discussion_r3477281747
##########
python/pyspark/sql/tests/test_udtf.py:
##########
@@ -595,7 +598,10 @@ def cleanup(self):
with open(path, "r") as f:
data = f.read()
- self.assertEqual(data, "cleanup")
+ # The cleanup method should be called even when terminate raises.
The UDTF may be
+ # retried, so cleanup can run more than once and the file may
contain multiple
+ # "cleanup" strings; just check that "cleanup" is present.
+ self.assertIn("cleanup", data)
Review Comment:
There's no `"terminate"` write in this test case, unlike the previous one.
So the check is not meaningful.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]