CryoThrust commented on issue #12262:
URL: https://github.com/apache/seatunnel/issues/12262#issuecomment-5633623791

   One testing detail that may help the implementation: the lifecycle contract 
should be verified separately for normal completion, task failure, and 
cancellation/restart on both adapters. In particular, a transform whose 
`open()` allocates a resource and whose `close()` records cleanup should assert:
   
   * `open()` runs once per task/operator instance before the first record;
   * `close()` runs once when the task completes or is cancelled, including an 
exception path;
   * a failed `open()` does not trigger a misleading `close()` for a resource 
that was never initialized;
   * parallel subtasks do not share the same transform instance or lifecycle 
state.
   
   For Flink this likely belongs in RichFunction lifecycle tests; for Spark, 
task-completion/context cleanup needs an explicit failure-path test rather than 
only a successful `mapPartitions` assertion.


-- 
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]

Reply via email to