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

Commit cb45fc7c authored by Hieu Dang's avatar Hieu Dang
Browse files

Ignore flaky UI tests for BluetoothOppNotification

Bug: 288660228
Test: atest BluetoothInstrumentationTests
Tag: #refactor
Change-Id: I8f2ee17078d653ac1515ef8ed760c7ca5bc2761b
parent 87d40daf
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -19,24 +19,19 @@ package com.android.bluetooth.opp;
import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_ENABLED;
import static android.content.pm.PackageManager.DONT_KILL_APP;

import static androidx.test.espresso.intent.Intents.intended;
import static androidx.test.espresso.intent.matcher.IntentMatchers.hasAction;

import static com.google.common.truth.Truth.assertThat;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;

import android.app.NotificationManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.ContextWrapper;
import android.database.MatrixCursor;
import android.util.Log;

import androidx.test.core.app.ApplicationProvider;
import androidx.test.espresso.intent.Intents;
@@ -54,6 +49,7 @@ import com.android.bluetooth.TestUtils;

import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -116,6 +112,7 @@ public class BluetoothOppNotificationTest {
        mOppNotification.cancelNotifications();
    }

    @Ignore("b/288660228")
    @Test
    public void updateActiveNotification() throws InterruptedException {
        long timestamp = 10L;
@@ -164,10 +161,11 @@ public class BluetoothOppNotificationTest {
    }

    @Test
    @Ignore("b/288660228")
    public void updateCompletedNotification_withOutBoundShare_showsNoti()
            throws InterruptedException {
        long timestamp = 10L;
        int status = BluetoothShare.STATUS_SUCCESS;
        int status = com.android.bluetooth.opp.BluetoothShare.STATUS_SUCCESS;
        int statusError = BluetoothShare.STATUS_CONNECTION_ERROR;
        int dir = BluetoothShare.DIRECTION_OUTBOUND;
        int id = 0;
@@ -212,6 +210,7 @@ public class BluetoothOppNotificationTest {
        assertThat(device.findObject(By.text(titleString))).isNull();
    }

    @Ignore("b/288660228")
    @Test
    public void updateCompletedNotification_withInBoundShare_showsNoti()
            throws InterruptedException {
@@ -261,6 +260,7 @@ public class BluetoothOppNotificationTest {
        assertThat(device.findObject(By.text(titleString))).isNull();
    }

    @Ignore("b/288660228")
    @Test
    public void updateIncomingFileConfirmationNotification() throws InterruptedException {
        long timestamp = 10L;