Commit 2090477b authored by OPNA2608's avatar OPNA2608
Browse files

nixosTests.lomiri-music-app: Reduce flakiness related to slow mediascanner

When lomiri-music-app is started before mediascanner has indexed any suitable media, navigation gets stuck on a
"no music found, please connect device" page.

mediascanner doesn't log when it is done processing media files, and inspecting ~/.cache/mediascanner-2.0/mediastore.db
is prolly not great either.

Let's assume for now that when the extractor sub-service gets spun up, we're getting close. Also sleep abit afterwards
just in case.
parent 257b6e47
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -133,6 +133,11 @@ in
    # mediascanner2 needs to have run, is only started automatically by Lomiri
    machine.systemctl("start mediascanner-2.0.service", "root")

    # Need to wait abit to make sure our test file gets scanned & added to the database.
    # No good feedback on when this is done... Prolly some time after extractor sub-service is started.
    machine.wait_for_console_text("Successfully activated service 'com.lomiri.MediaScanner2.Extractor'")
    machine.sleep(10)

    with subtest("lomiri music launches"):
        machine.succeed("lomiri-music-app >&2 &")
        machine.wait_for_console_text("Queue is empty")