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

Commit cdc122cc authored by Richard Uhler's avatar Richard Uhler
Browse files

Add explicit GCs to SystemMemoryTest.

Bug: 111830582
Test: atest -v system-memory-test, manually confirming GC is triggered
      in system server.

Change-Id: I8d755f8be50d1a77c4bfc68bbde67b719e11bd96
parent 1d5a7137
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -31,6 +31,12 @@ public class Cujs {
     * Runs the critical user journeys.
     */
    public void run() throws TestException {
        // Do an explicit GC in the system server process as part of the test
        // case to reduce GC-related sources of noise.
        // SIGUSR1 = 10 is the magic signal to trigger the GC.
        int pid = mDevice.getPidForProcess("system_server");
        mDevice.executeShellCommand("kill -10 " + pid);

        // Invoke the Device Cujs instrumentation to run the cujs.
        // TODO: Consider exercising the system in other interesting ways as
        // well.