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

Commit 6b771ce3 authored by Aurimas Liutikas's avatar Aurimas Liutikas
Browse files

Suppress AppCacheTest tests that cause am instrument failure.

These tests runs a command to clear application data and by
doing so causes the application that is being instrumented
to restart, which in turn "am instrument' thinks is an app
crash, thus aborting the rest of the tests.

Bug: 38238448
Change-Id: Ida69b828a9950a83d790a3a7628e32c14a04a772
Test: bit FrameworksCoreTests:android.content.pm.AppCacheTest
parent 34480d2c
Loading
Loading
Loading
Loading
+44 −41
Original line number Diff line number Diff line
@@ -25,11 +25,11 @@ import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.StatFs;
import android.os.UserHandle;
import android.support.test.filters.LargeTest;
import android.support.test.filters.MediumTest;
import android.support.test.filters.SmallTest;
import android.support.test.filters.Suppress;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.LargeTest;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;
import android.test.suitebuilder.annotation.Suppress;
import android.util.Log;

import java.io.File;
@@ -728,6 +728,7 @@ public class AppCacheTest extends AndroidTestCase {
        }
    }

    @Suppress
    @LargeTest
    public void testClearApplicationUserDataWithTestData() throws Exception {
        File cacheDir = mContext.getCacheDir();
@@ -741,6 +742,7 @@ public class AppCacheTest extends AndroidTestCase {
        verifyUserDataCleared(getDataDir());
    }

    @Suppress
    @SmallTest
    public void testClearApplicationUserDataWithNoTestData() throws Exception {
        assertTrue(invokePMClearApplicationUserData());
@@ -748,6 +750,7 @@ public class AppCacheTest extends AndroidTestCase {
        verifyUserDataCleared(getDataDir());
    }

    @Suppress
    @LargeTest
    public void testClearApplicationUserDataNoObserver() throws Exception {
        getPm().clearApplicationUserData(mContext.getPackageName(), null, UserHandle.myUserId());