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

Commit 9c539213 authored by Jun Ono's avatar Jun Ono Committed by Shunta Sato
Browse files

Change storage size before starting test

Symptom:
CancelFromNotificationUiTest is failed because of broken pipe error.

Root cause:
super.setUp() method will change the storage size to 100MB.
On the other hand, this test case uses a 500MB file as a
dummy file. Therefore, the file capacity is insufficient
and an error occurs.

Solution:
After excuting super.setup(), reset the storage size again to 500MB.

Bug: 72137394
Test: Unittest of com.android.documentsui.tests
Change-Id: Ib9cc0211b4e8176ff5747b977a9dc485d439ea8d
parent b2bd56d6
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.documentsui;

import static com.android.documentsui.StubProvider.EXTRA_SIZE;
import static com.android.documentsui.StubProvider.ROOT_0_ID;
import static com.android.documentsui.StubProvider.ROOT_1_ID;

@@ -30,6 +31,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.BroadcastReceiver;
import android.net.Uri;
import android.os.Bundle;
import android.os.RemoteException;
import android.provider.Settings;
import android.support.test.filters.LargeTest;
@@ -97,6 +99,13 @@ public class CancelFromNotificationUiTest extends ActivityTest<FilesActivity> {
    @Override
    public void setUp() throws Exception {
        super.setUp();

        // super.setUp() method will change the storage size to 100MB.
        // So, reset the storage size again to 500MB.
        Bundle bundle = new Bundle();
        bundle.putLong(EXTRA_SIZE, 500L);
        mDocsHelper.configure(null, bundle);

        initTestFiles();

        IntentFilter filter = new IntentFilter();