mavsdk-tests: Re-try to launch a mission for some time before failing. This mitigates an issue where the flight controller has an uploaded mission, but has not finished the mission feasibility checks yet.

This commit is contained in:
Thomas Debrunner 2021-11-18 15:37:54 +01:00 committed by Daniel Agar
parent 764af19da4
commit 9312c772f1

View File

@ -236,7 +236,9 @@ void AutopilotTester::execute_mission()
std::promise<void> prom;
auto fut = prom.get_future();
REQUIRE(_mission->start_mission() == Mission::Result::Success);
REQUIRE(poll_condition_with_timeout(
[this]() { return _mission->start_mission() == Mission::Result::Success; }, std::chrono::seconds(3)));
// TODO: Adapt time limit based on mission size, flight speed, sim speed factor, etc.