equinor / flotilla

Flotilla is the main point of access for operators to interact with multiple robots in a facility.
Eclipse Public License 2.0
16 stars 35 forks source link

Improve assert for ReturnToHomeMissionIsStartedIfQueueIsEmptyWhenRobotBecomesAvailable #1445

Open oysand opened 7 months ago

oysand commented 7 months ago

Describe the improvement you would like to see The test currently only assert that there is no ongoing mission, which does not take into account whether or not the previous completed mission run was a return to home mission.

See: https://github.com/equinor/flotilla/blob/main/backend/api.test/EventHandlers/TestMissionEventHandler.cs

            // Assert
            Thread.Sleep(1000);
            var ongoingMission = await _missionRunService.ReadAll(
                new MissionRunQueryStringParameters
                {
                    Statuses = [
                        MissionStatus.Ongoing
                    ],
                    OrderBy = "DesiredStartTime",
                    PageSize = 100
                });
            Assert.False(ongoingMission.Any());
        }

How will this change existing functionality? More accurate tests

How will this improvement affect the current Threat Model? N/A

aeshub commented 4 months ago

This issue has automatically been marked as stale as there has been no activity for 60 days.