From e535f6faeda431a69a24dc3cdf0ff68541fe37c1 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 6 Nov 2024 08:33:52 +0100 Subject: [PATCH] Avoid non-deterministic QPUnitTests failure (#172) --- tests/QPTest.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/QPTest.cpp b/tests/QPTest.cpp index 1e9fd73..f5c8018 100644 --- a/tests/QPTest.cpp +++ b/tests/QPTest.cpp @@ -71,6 +71,8 @@ TEST_CASE("QPProblem") OsqpEigen::Solver solver; solver.settings()->setVerbosity(true); solver.settings()->setAlpha(1.0); + // This is required to avoid non-deterministic non-accurate solutions + solver.settings()->setPolish(true); REQUIRE_FALSE(solver.data()->setHessianMatrix(H_s)); solver.data()->setNumberOfVariables(2);