Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df084f35 authored by Ady Abraham's avatar Ady Abraham
Browse files

composer: deflake Test_expectedPresentTime

Test_expectedPresentTime might fail due to scheduling delays.
To avoid that, we test that the actual presentation didn't
happen too early, but we allow for a late presentation.

Bug: 198186194
Test: VTS
Change-Id: I9be4bfe5a848443e69ef7b62ffb3dae675a9b81f
parent e57e0962
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1426,8 +1426,7 @@ class GraphicsComposerAidlCommandTest : public GraphicsComposerAidlTest {
        presentFence2->waitForever(LOG_TAG);

        const auto actualPresentTime = presentFence2->getSignalTime();
        const auto presentError = std::abs(expectedPresentTime - actualPresentTime);
        EXPECT_LE(presentError, vsyncPeriod / 2);
        EXPECT_GE(actualPresentTime, expectedPresentTime - vsyncPeriod / 2);

        ASSERT_TRUE(mComposerClient->setPowerMode(mPrimaryDisplay, PowerMode::OFF).isOk());
    }