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

Emit TaskCompleted event when a Fixed task is completed #385

Merged
merged 4 commits into from
Jul 20, 2023

Conversation

imstar15
Copy link
Member

No description provided.

@imstar15 imstar15 changed the title Emit TaskCompleted event when a Fixed task is completed [WIP]Emit TaskCompleted event when a Fixed task is completed Jul 18, 2023
@imstar15 imstar15 changed the title [WIP]Emit TaskCompleted event when a Fixed task is completed Emit TaskCompleted event when a Fixed task is completed Jul 19, 2023
@imstar15 imstar15 requested review from v9n and chrisli30 July 19, 2023 16:56
@imstar15 imstar15 marked this pull request as ready for review July 19, 2023 16:56
Copy link
Member

@chrisli30 chrisli30 left a comment

Choose a reason for hiding this comment

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

Okay LGTM. The dev code is rather simple, and the newly added test coverage looks good.

let my_events = events();

let event = my_events.into_iter().find(|e| {
matches!(e, RuntimeEvent::AutomationTime(crate::Event::TaskCompleted { .. }))
Copy link
Member

Choose a reason for hiding this comment

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

should we also assert the TaskId was right as well?

Copy link
Member Author

@imstar15 imstar15 Jul 20, 2023

Choose a reason for hiding this comment

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

In the TaskCompleted test, there is only one task, and we do not need to concern ourselves with the task_id parameter.

@imstar15 imstar15 merged commit 0ebac69 into master Jul 20, 2023
@imstar15 imstar15 deleted the task-completed-event branch July 20, 2023 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants