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

vdk-heartbeat: Successful data job run test mode #718

Merged
merged 1 commit into from
Feb 19, 2022

Conversation

ivakoleva
Copy link
Contributor

The util was missing a simple test, that verifies the (custom or not)
data job has run once and succeeded.

Introduced successful_run_test.py. Elaborated on job_controller.py
to return the data job status on check_job_execution_finished.
Fixed a controller bug - in case no executions were present, the flag
was still set to job_execution_running = False.

Testing Done: did verify locally the filtering of latest_end_date
and retrieving the status based on execution list data.

Signed-off-by: ikoleva ikoleva@vmware.com

The util was missing a simple test, that verifies the (custom or not)
data job has run once and succeeded.

Introduced `successful_run_test.py`. Elaborated on `job_controller.py`
to return the data job status on `check_job_execution_finished`.
Fixed a controller bug - in case no executions were present, the flag
was still set to `job_execution_running = False`.

Testing Done: did verify locally the filtering of latest_end_date
and retrieving the status based on execution list data.

Signed-off-by: ikoleva <ikoleva@vmware.com>
@ivakoleva ivakoleva enabled auto-merge (squash) February 18, 2022 17:13
@ivakoleva ivakoleva merged commit dd2f280 into main Feb 19, 2022
status = None
try:
status = self.__job_controller.check_job_execution_finished()
except Exception as e:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exception object seems not used. Maybe log the exception before raising the AssertionError?

time.sleep(10)
log.info(f"Data job is running : {job_execution_running}")
assert not job_execution_running, (
f"VDK-heartbeat timed out. Job execution {self.config.job_name} "
+ f"did not finish in {self.config.RUN_TEST_TIMEOUT_SECONDS}."
)
if not execution_list:
return None
latest_end_date = max(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Maybe add a blank line, as now it feels a bit crowded.

@ivakoleva ivakoleva deleted the person/ikoleva/successful-run-heartbeat-test branch February 19, 2022 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants