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

Skip to content
Commit 1abb56b4 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Reduce unused initialization for ActivityManager tests

- Only initialize the necessary members of AMS for testing.
- Use the thread which created by test so it can be shutdown.
  Originally the uncontrolled threads may have some delayed
  message that executes in arbitrary time and causes unexpected
  errors.

Except fixing the thread leakage, the testing time of below
command (currently the amount is 146) is reduced from 13s to 6s.

Bug: 117913959
Test: atest -b FrameworksServicesTests
      adb shell am instrument -e package com.android.server.am \
      -e annotation android.platform.test.annotations.Presubmit \
      -e notAnnotation androidx.test.filters.FlakyTest \
      -w -r com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner

Change-Id: Ib6db36af58fc299ff558744d33a21f4aed317a37
parent ec397364
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment