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 for system available for mission logic #2023

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aeshub
Copy link
Contributor

@aeshub aeshub commented Feb 13, 2025

Ready for review checklist:

  • A self-review has been performed
  • All commits run individually
  • Temporary changes have been removed, like console.log, TODO, etc.
  • The PR has been tested locally
  • A test have been written
    • This change doesn't need a new test
  • Relevant issues are linked
  • Remaining work is documented in issues
    • There is no remaining work from this PR that require new issues
  • The changes does not introduce dead code as unused imports, functions etc.

@aeshub aeshub added backend Backend related functionality improvement Improvement to existing functionality labels Feb 13, 2025
@aeshub aeshub self-assigned this Feb 13, 2025
[InlineData(true, MissionRunType.ReturnHome, RobotStatus.Available, true, false, true)]
[InlineData(false, MissionRunType.Normal, RobotStatus.Busy, true, false, false)]
[InlineData(false, MissionRunType.Normal, RobotStatus.Available, false, false, false)]
[InlineData(false, MissionRunType.Normal, RobotStatus.Available, true, true, false)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add

Suggested change
[InlineData(false, MissionRunType.Normal, RobotStatus.Available, true, true, false)]
[InlineData(false, MissionRunType.Normal, RobotStatus.Available, true, true, false)]
[InlineData(false, MissionRunType.Emergency, RobotStatus.Busy, true, false, true)]

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interestingly enough this test returns false. Meaning it is not possible to schedule an emergency mission through this logic while the robot is busy, but it might be the current implementation means we stop the current mission first and then we allow the emergency mission to run because the robot is then available. Will investigate a bit more as it would have been great to keep all the logic within this function if feasible.

@aeshub aeshub force-pushed the logic-test-available branch 3 times, most recently from fd910a1 to eee1317 Compare February 20, 2025 11:16
@aeshub aeshub force-pushed the logic-test-available branch from eee1317 to b0191a6 Compare February 20, 2025 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend related functionality improvement Improvement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants