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

Commit 68e882ce authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

Added TaskSnapshotCacheTest back to presubmit

The problem the test was having was fixed by ag/2179887

Also, fixed NPE during test tear down.

Change-Id: I974fcb9a12928dd4494525f9bae5c7c448657e30
Fixes: 35196891
Bug: 37682538
Test: TaskSnapshotCacheTest
parent 251894b1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;

import android.platform.test.annotations.Presubmit;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;

@@ -33,8 +34,7 @@ import org.junit.runner.RunWith;
 * runtest frameworks-services -c com.android.server.wm.TaskSnapshotCacheTest
 */
@SmallTest
// TODO(b/35196891): Add back to presubmit once the bug is fixed.
//@Presubmit
@Presubmit
@RunWith(AndroidJUnit4.class)
public class TaskSnapshotCacheTest extends TaskSnapshotPersisterTestBase {

+5 −1
Original line number Diff line number Diff line
@@ -68,7 +68,11 @@ class TaskSnapshotPersisterTestBase extends WindowTestsBase {
    }

    private void cleanDirectory() {
        for (File file : new File(sFilesDir, "snapshots").listFiles()) {
        final File[] files = new File(sFilesDir, "snapshots").listFiles();
        if (files == null) {
            return;
        }
        for (File file : files) {
            if (!file.isDirectory()) {
                file.delete();
            }