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

Commit e548fc8c authored by Yu Shan's avatar Yu Shan
Browse files

Fix flakiness in DefaultVhalImpl_test.

Test: atest android.hardware.automotive.vehicle@2.0-default-impl-unit-tests
Bug: 272569067
Change-Id: I54c45d80cf09d314cafbd30844e9fbe296de4986
parent 3750a762
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -756,8 +756,9 @@ TEST_F(DefaultVhalImplTest, testDebugGenFakeDataLinear) {
    // Clear existing events.
    mEventQueue.flush();
    std::this_thread::sleep_for(std::chrono::milliseconds(500));
    // There should be no new events generated.
    EXPECT_EQ((size_t)0, mEventQueue.flush().size());
    // Technically there should be no new events generated, however, there might still be one event
    // in the queue while we are stopping the generator.
    EXPECT_LE(mEventQueue.flush().size(), 1u);
}

std::string getTestFilePath(const char* filename) {