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

Commit c60bf709 authored by Lloyd Pique's avatar Lloyd Pique
Browse files

[RESTRICT AUTOMERGE] SF: Disable flaky unit tests

A good number of OneShotTimer tests, and two LayerHistoryTestV2 tests
were flaky. This changes marks them as DISABLED, with a comment linking
to the bug.

Bug: 186417847
Test: libsurfaceflinger_unittest # Tests marked disabled
Change-Id: I36410b802dc03e2408ce6c4c79d975d9eb021332
Merged-In: I75a034e6a79e0469b3a321e410ca0d6db36bd5fe
parent c052fed1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -120,7 +120,8 @@ protected:

namespace {

TEST_F(LayerHistoryTestV2, oneLayer) {
// TODO(b/186417847) This test is flaky. Reenable once fixed.
TEST_F(LayerHistoryTestV2, DISABLED_oneLayer) {
    const auto layer = createLayer();
    EXPECT_CALL(*layer, isVisible()).WillRepeatedly(Return(true));
    EXPECT_CALL(*layer, getFrameRateForLayerTree()).WillRepeatedly(Return(Layer::FrameRate()));
@@ -631,7 +632,8 @@ TEST_F(LayerHistoryTestV2, infrequentAnimatingLayer) {
    EXPECT_EQ(1, animatingLayerCount(time));
}

TEST_F(LayerHistoryTestV2, heuristicLayer60Hz) {
// TODO(b/186417847) This test is flaky. Reenable once fixed.
TEST_F(LayerHistoryTestV2, DISABLED_heuristicLayer60Hz) {
    const auto layer = createLayer();
    EXPECT_CALL(*layer, isVisible()).WillRepeatedly(Return(true));
    EXPECT_CALL(*layer, getFrameRateForLayerTree()).WillRepeatedly(Return(Layer::FrameRate()));
+10 −5
Original line number Diff line number Diff line
@@ -80,7 +80,8 @@ TEST_F(OneShotTimerTest, startStopTest) {
    mIdleTimer->stop();
}

TEST_F(OneShotTimerTest, resetTest) {
// TODO(b/186417847) This test is flaky. Reenable once fixed.
TEST_F(OneShotTimerTest, DISABLED_resetTest) {
    mIdleTimer = std::make_unique<scheduler::OneShotTimer>(20ms, mResetTimerCallback.getInvocable(),
                                                           mExpiredTimerCallback.getInvocable());
    mIdleTimer->start();
@@ -105,7 +106,8 @@ TEST_F(OneShotTimerTest, resetTest) {
    EXPECT_FALSE(mResetTimerCallback.waitForCall(0ms).has_value());
}

TEST_F(OneShotTimerTest, resetBackToBackTest) {
// TODO(b/186417847) This test is flaky. Reenable once fixed.
TEST_F(OneShotTimerTest, DISABLED_resetBackToBackTest) {
    mIdleTimer = std::make_unique<scheduler::OneShotTimer>(20ms, mResetTimerCallback.getInvocable(),
                                                           mExpiredTimerCallback.getInvocable());
    mIdleTimer->start();
@@ -136,7 +138,8 @@ TEST_F(OneShotTimerTest, resetBackToBackTest) {
    EXPECT_FALSE(mResetTimerCallback.waitForCall(0ms).has_value());
}

TEST_F(OneShotTimerTest, startNotCalledTest) {
// TODO(b/186417847) This test is flaky. Reenable once fixed.
TEST_F(OneShotTimerTest, DISABLED_startNotCalledTest) {
    mIdleTimer = std::make_unique<scheduler::OneShotTimer>(3ms, mResetTimerCallback.getInvocable(),
                                                           mExpiredTimerCallback.getInvocable());
    // The start hasn't happened, so the callback does not happen.
@@ -148,7 +151,8 @@ TEST_F(OneShotTimerTest, startNotCalledTest) {
    EXPECT_FALSE(mResetTimerCallback.waitForCall(0ms).has_value());
}

TEST_F(OneShotTimerTest, idleTimerIdlesTest) {
// TODO(b/186417847) This test is flaky. Reenable once fixed.
TEST_F(OneShotTimerTest, DISABLED_idleTimerIdlesTest) {
    mIdleTimer = std::make_unique<scheduler::OneShotTimer>(3ms, mResetTimerCallback.getInvocable(),
                                                           mExpiredTimerCallback.getInvocable());
    mIdleTimer->start();
@@ -168,7 +172,8 @@ TEST_F(OneShotTimerTest, idleTimerIdlesTest) {
    EXPECT_FALSE(mResetTimerCallback.waitForCall(0ms).has_value());
}

TEST_F(OneShotTimerTest, timeoutCallbackExecutionTest) {
// TODO(b/186417847) This test is flaky. Reenable once fixed.
TEST_F(OneShotTimerTest, DISABLED_timeoutCallbackExecutionTest) {
    mIdleTimer = std::make_unique<scheduler::OneShotTimer>(3ms, mResetTimerCallback.getInvocable(),
                                                           mExpiredTimerCallback.getInvocable());
    mIdleTimer->start();