Skip to content

Commit

Permalink
Replace use of Suppress with Ignore in tests
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 676927121
  • Loading branch information
brettchabot authored and copybara-androidxtest committed Sep 23, 2024
1 parent 00266a9 commit 36a50f5
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
import androidx.test.core.app.ActivityScenario;
import androidx.test.core.app.ActivityScenario.ActivityAction;
import androidx.test.espresso.PerformException;
import androidx.test.filters.Suppress;
import androidx.test.ui.app.ItemListAdapter.CustomViewHolder;
import androidx.test.ui.app.R;
import androidx.test.ui.app.RecyclerViewActivity;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

public abstract class RecyclerViewIntegrationTest {
Expand Down Expand Up @@ -191,7 +191,7 @@ public void testScrolling_scrollToItemAndClick() {
}

// TODO(b/68003948): flaky
@Suppress
@Ignore
@Test
public void testScrolling_scrollToMultipleViewsAndClick() {
onView(withId(rvLayoutId)).perform(scrollTo(hasDescendant(withText(ITEM_16))));
Expand Down Expand Up @@ -338,7 +338,7 @@ public void testActionOnItemAtPosition_clickOnLastAndFirstItem() {
}

// TODO(b/68003948): flaky
@Suppress
@Ignore
@Test
public void testActionsOnItem_clickMultipleItems() throws InterruptedException {
onView(withItemText(ITEM_64)).check(doesNotExist());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
import androidx.test.ext.junit.rules.ActivityScenarioRule;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.filters.Suppress;
import androidx.test.ui.app.LongListActivity;
import androidx.test.ui.app.R;
import java.util.Map;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -49,7 +49,7 @@ public class AdapterDataIntegrationTest {
new ActivityScenarioRule<>(LongListActivity.class);

@Test
@Suppress // flaky
@Ignore // flaky
public void clickAroundList() {
onData(allOf(is(instanceOf(Map.class)), hasEntry(is(LongListActivity.STR), is("item: 99"))))
.perform(click());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
import androidx.test.ext.junit.rules.ActivityScenarioRule;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.filters.Suppress;
import androidx.test.ui.app.R;
import androidx.test.ui.app.SendActivity;
import org.hamcrest.CustomTypeSafeMatcher;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
Expand Down Expand Up @@ -68,7 +68,7 @@ public void pressImeActionButtonOnSearchBox() {
* Test only passes if run in isolation. Unless Gradle supports a single instrumentation per test
* this test is ignored"
*/
@Suppress
@Ignore
@Test
public void pressImeActionButtonOnNonEditorWidget() {
expectedException.expect(PerformException.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.FlakyTest;
import androidx.test.filters.LargeTest;
import androidx.test.filters.Suppress;
import androidx.test.ui.app.MainActivity;
import androidx.test.ui.app.R;
import java.util.Map;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
Expand All @@ -63,7 +63,7 @@ public class KeyEventActionIntegrationTest {
* Test only passes if run in isolation. Unless Gradle supports a single instrumentation per test
* this test is ignored"
*/
@Suppress
@Ignore
@Test
public void clickBackOnRootAction() {
ActivityScenario.launch(MainActivity.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.filters.Suppress;
import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Future;
Expand All @@ -31,6 +30,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import org.junit.After;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;

Expand Down Expand Up @@ -97,7 +97,7 @@ public void run() {
}

// TODO(b/68003948): flaky
@Suppress
@Ignore
@Test
public void idleNotificationAndRestart() throws Exception {

Expand Down Expand Up @@ -153,7 +153,7 @@ public void run() {
}

// TODO(b/68003948): flaky
@Suppress
@Ignore
@Test
public void idleNotification_extraWork() throws Exception {
final CountDownLatch firstRunLatch = new CountDownLatch(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import androidx.test.espresso.base.IdlingResourceRegistry.IdleNotificationCallback;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.filters.Suppress;
import androidx.test.platform.tracing.Tracing;
import androidx.test.ui.app.R;
import androidx.test.ui.app.SendActivity;
Expand All @@ -45,6 +44,7 @@
import java.util.List;
import javax.inject.Provider;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;

Expand Down Expand Up @@ -189,7 +189,7 @@ public void injectMotionEvent() throws InterruptedException, IOException {
}

@Test
@Suppress // flaky, uiController.injectMotionEventSequence can intermittently return false
@Ignore // flaky, uiController.injectMotionEventSequence can intermittently return false
public void injectMotionEventSequence() throws InterruptedException {
try (ActivityScenario<SendActivity> scenario = ActivityScenario.launch(SendActivity.class)) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import androidx.test.espresso.remote.RemoteEspressoException;
import androidx.test.ext.junit.rules.ActivityScenarioRule;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.Suppress;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down Expand Up @@ -95,7 +95,7 @@ public void verifyAssertingOnDataInRemoteProcessIsSuccessful() {
}

@Test
@Suppress // flaky b/264579367
@Ignore // flaky b/264579367
public void verifySwitchingBetweenTwoProcessesQuicklyWorks() {
Log.d(TAG, "Checking main process name...");
onView(withId(R.id.textNamedProcess)).check(matches(withText(is(DEFAULT_PROC_NAME))));
Expand Down

0 comments on commit 36a50f5

Please sign in to comment.