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

Commit 6f44bd04 authored by Mathieu Chartier's avatar Mathieu Chartier
Browse files

Make BootImageProfileTest less flaky

Number one flake is when the system server process is killed before
SIGUSR1. Change this case to be non fatal.

Increase number of retry iterations in case the package manager
is very slow to start and get a JIT sample. Hopefully fixes the
other flake where PackageManagerService.<init> is not seen in the
profile.

(cherry-picked from commit d5d442dd)

Test: atest BootImageProfileTest
Bug: 149802360
Merged-In: I52ac80f15d8efe152dea81b75a82faa4da1b8600
Change-Id: I52ac80f15d8efe152dea81b75a82faa4da1b8600
parent a37afa40
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -78,13 +78,12 @@ public class BootImageProfileTest implements IDeviceTest {
            return false;
        }
        String res = mTestDevice.executeShellCommand("kill -s SIGUSR1 " + pid).trim();
        assertTrue("kill SIGUSR1: " + res, res.length() == 0);
        return true;
        return res.length() == 0;
    }

    @Test
    public void testSystemServerProfile() throws Exception {
        final int numIterations = 20;
        final int numIterations = 30;
        String res;
        // Set properties and wait for them to be readable.
        for (int i = 1; i <= numIterations; ++i) {