From 84ae3dd55c9302f5a16a034637e25d73c3db185b Mon Sep 17 00:00:00 2001 From: Sudheer Shanka Date: Sun, 23 Apr 2023 07:55:09 +0000 Subject: [PATCH] Remove an obsolete verification from test. Also, add the test to Presubmit. Fixes: 279050655 Test: atest com.android.server.am.ActivityManagerInternalTest Change-Id: Ife88667dbc69863c4cab64d56ab2bdc560a9aaaf --- .../server/am/ActivityManagerInternalTest.java | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityManagerInternalTest.java b/services/tests/servicestests/src/com/android/server/am/ActivityManagerInternalTest.java index 16406bcb9a1f5..4167c7e897585 100644 --- a/services/tests/servicestests/src/com/android/server/am/ActivityManagerInternalTest.java +++ b/services/tests/servicestests/src/com/android/server/am/ActivityManagerInternalTest.java @@ -23,8 +23,9 @@ import static org.mockito.Mockito.doReturn; import android.app.ActivityManagerInternal; import android.os.SystemClock; +import android.platform.test.annotations.Presubmit; -import androidx.test.filters.MediumTest; +import androidx.test.filters.SmallTest; import androidx.test.platform.app.InstrumentationRegistry; import org.junit.Before; @@ -39,13 +40,14 @@ import org.mockito.MockitoAnnotations; * Build/Install/Run: * atest FrameworksServicesTests:ActivityManagerInternalTest */ +@Presubmit +@SmallTest public class ActivityManagerInternalTest { private static final int TEST_UID1 = 111; private static final int TEST_UID2 = 112; private static final long TEST_PROC_STATE_SEQ1 = 1111; private static final long TEST_PROC_STATE_SEQ2 = 1112; - private static final long TEST_PROC_STATE_SEQ3 = 1113; @Rule public ServiceThreadRule mServiceThreadRule = new ServiceThreadRule(); @@ -68,7 +70,6 @@ public class ActivityManagerInternalTest { mAmi = mAms.new LocalService(); } - @MediumTest @Test public void testNotifyNetworkPolicyRulesUpdated() throws Exception { // Check there is no crash when there are no active uid records. @@ -89,14 +90,6 @@ public class ActivityManagerInternalTest { TEST_PROC_STATE_SEQ1, // lastNetworkUpdateProcStateSeq TEST_PROC_STATE_SEQ1, // procStateSeq to notify false); // expectNotify - - // Notify that network policy rules are updated for TEST_UID1 with procStateSeq older - // than it's UidRecord.curProcStateSeq and verify that there is no notify call. - verifyNetworkUpdatedProcStateSeq( - TEST_PROC_STATE_SEQ3, // curProcStateSeq - TEST_PROC_STATE_SEQ1, // lastNetworkUpdateProcStateSeq - TEST_PROC_STATE_SEQ2, // procStateSeq to notify - false); // expectNotify } private void verifyNetworkUpdatedProcStateSeq(long curProcStateSeq,