From f964290ea803bfc4b8eca1fcd3b870379bdaffaa Mon Sep 17 00:00:00 2001 From: Triang3l Date: Sun, 12 May 2024 17:44:52 +0300 Subject: [PATCH] [Base] Relax the system clock difference allowance in the test Hopefully should reduce the CI failure rate, although this testing approach is fundamentally flawed as it depends on OS scheduling. --- src/xenia/base/testing/chrono_test.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/xenia/base/testing/chrono_test.cc b/src/xenia/base/testing/chrono_test.cc index a63aac53c..f35f17ed8 100644 --- a/src/xenia/base/testing/chrono_test.cc +++ b/src/xenia/base/testing/chrono_test.cc @@ -107,10 +107,11 @@ TEST_CASE("WinSystemClock <-> XSystemClock", "[clock_cast]") { auto error2 = xsys.time_since_epoch() - wxsys.time_since_epoch(); auto error3 = wsys - wxsys; - REQUIRE(error1 < 10ms); - REQUIRE(error1 > -10ms); - REQUIRE(error2 < 10ms); - REQUIRE(error2 > -10ms); + // In AppVeyor, the difference often can be as large as roughly 16ms. + REQUIRE(error1 < 20ms); + REQUIRE(error1 > -20ms); + REQUIRE(error2 < 20ms); + REQUIRE(error2 > -20ms); REQUIRE(error3 < duration); REQUIRE(error3 > -duration); }