Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test case to verify SparkJob completed exceptionally #233

Open
yunfengzhou-hub opened this issue Sep 18, 2023 · 0 comments
Open

Add test case to verify SparkJob completed exceptionally #233

yunfengzhou-hub opened this issue Sep 18, 2023 · 0 comments
Labels
type:improvement improvement to existing functionality

Comments

@yunfengzhou-hub
Copy link
Collaborator

class SparkJob(ProcessorJob):
    """Represent a Spark job."""

    def __init__(
        self,
        job_future: Future,
    ) -> None:
        super().__init__()
        self._job_future = job_future

    # TODO: Add test case to verify this method's behavior when job future
    #  is completed exceptionally.
    def cancel(self) -> Future:
        cancel_future: Future = Future()
        job_future_callback = self._get_job_future_callback(cancel_future)
        self._job_future.add_done_callback(job_future_callback)
        return cancel_future
@yunfengzhou-hub yunfengzhou-hub added priority:major type:improvement improvement to existing functionality and removed priority:major labels Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:improvement improvement to existing functionality
Projects
None yet
Development

No branches or pull requests

1 participant