Turn off BrightLineClassifier tests until memory leaks can be identified.

Bug: 135715570
Test: atest SystemUITests
Change-Id: I334ffe87dc7c28367e4f238a9f7928839b7d831c
This commit is contained in:
Dave Mankoff
2019-06-24 14:14:30 -04:00
parent 18fff17455
commit cc28d7b6c0
7 changed files with 75 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -56,18 +57,21 @@ public class DiagonalClassifierTest extends SysuiTestCase {
private FalsingClassifier mClassifier;
@Before
@Ignore("Memory Leak?")
public void setup() {
MockitoAnnotations.initMocks(this);
mClassifier = new DiagonalClassifier(mDataProvider);
}
@Test
@Ignore("Memory Leak?")
public void testPass_UnknownAngle() {
when(mDataProvider.getAngle()).thenReturn(Float.MAX_VALUE);
assertThat(mClassifier.isFalseTouch(), is(false));
}
@Test
@Ignore("Memory Leak?")
public void testPass_VerticalSwipe() {
when(mDataProvider.getAngle()).thenReturn(UP_IN_RADIANS);
assertThat(mClassifier.isFalseTouch(), is(false));
@@ -77,6 +81,7 @@ public class DiagonalClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_MostlyVerticalSwipe() {
when(mDataProvider.getAngle()).thenReturn(UP_IN_RADIANS + 2 * FIVE_DEG_IN_RADIANS);
assertThat(mClassifier.isFalseTouch(), is(false));
@@ -92,6 +97,7 @@ public class DiagonalClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_BarelyVerticalSwipe() {
when(mDataProvider.getAngle()).thenReturn(
UP_IN_RADIANS - FORTY_FIVE_DEG_IN_RADIANS + 2 * FIVE_DEG_IN_RADIANS);
@@ -111,6 +117,7 @@ public class DiagonalClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_HorizontalSwipe() {
when(mDataProvider.getAngle()).thenReturn(RIGHT_IN_RADIANS);
assertThat(mClassifier.isFalseTouch(), is(false));
@@ -120,6 +127,7 @@ public class DiagonalClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_MostlyHorizontalSwipe() {
when(mDataProvider.getAngle()).thenReturn(RIGHT_IN_RADIANS + 2 * FIVE_DEG_IN_RADIANS);
assertThat(mClassifier.isFalseTouch(), is(false));
@@ -135,6 +143,7 @@ public class DiagonalClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_BarelyHorizontalSwipe() {
when(mDataProvider.getAngle()).thenReturn(
RIGHT_IN_RADIANS + FORTY_FIVE_DEG_IN_RADIANS - 2 * FIVE_DEG_IN_RADIANS);
@@ -154,6 +163,7 @@ public class DiagonalClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_AffordanceSwipe() {
when(mDataProvider.getInteractionType()).thenReturn(LEFT_AFFORDANCE);
when(mDataProvider.getAngle()).thenReturn(
@@ -172,6 +182,7 @@ public class DiagonalClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testFail_DiagonalSwipe() {
// Horizontal Swipes
when(mDataProvider.isVertical()).thenReturn(false);

View File

@@ -29,6 +29,7 @@ import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -61,11 +62,13 @@ public class DistanceClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_noPointer() {
assertThat(mClassifier.isFalseTouch(), is(true));
}
@Test
@Ignore("Memory Leak?")
public void testPass_fling() {
MotionEvent motionEventA = MotionEvent.obtain(1, 1, MotionEvent.ACTION_DOWN, 1, 1, 0);
MotionEvent motionEventB = MotionEvent.obtain(1, 2, MotionEvent.ACTION_MOVE, 1, 2, 0);
@@ -86,6 +89,7 @@ public class DistanceClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testFail_flingShort() {
MotionEvent motionEventA = MotionEvent.obtain(1, 1, MotionEvent.ACTION_DOWN, 1, 1, 0);
MotionEvent motionEventB = MotionEvent.obtain(1, 2, MotionEvent.ACTION_MOVE, 1, 2, 0);
@@ -106,6 +110,7 @@ public class DistanceClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testFail_flingSlowly() {
// These events, in testing, result in a fling that falls just short of the threshold.
MotionEvent motionEventA = MotionEvent.obtain(1, 1, MotionEvent.ACTION_DOWN, 1, 1, 0);
@@ -136,6 +141,7 @@ public class DistanceClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_swipe() {
MotionEvent motionEventA = MotionEvent.obtain(1, 1, MotionEvent.ACTION_DOWN, 1, 1, 0);
MotionEvent motionEventB = MotionEvent.obtain(1, 3, MotionEvent.ACTION_MOVE, 1, DPI * 3, 0);

View File

@@ -29,6 +29,7 @@ import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -47,6 +48,7 @@ public class FalsingDataProviderTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void test_trackMotionEvents() {
MotionEvent motionEventA = obtainMotionEvent(MotionEvent.ACTION_DOWN, 1, 2, 9);
MotionEvent motionEventB = obtainMotionEvent(MotionEvent.ACTION_MOVE, 2, 4, 7);
@@ -77,6 +79,7 @@ public class FalsingDataProviderTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void test_trackRecentMotionEvents() {
MotionEvent motionEventA = obtainMotionEvent(MotionEvent.ACTION_DOWN, 1, 2, 9);
MotionEvent motionEventB = obtainMotionEvent(MotionEvent.ACTION_MOVE, 800, 4, 7);
@@ -122,6 +125,7 @@ public class FalsingDataProviderTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void test_unpackMotionEvents() {
// Batching only works for motion events of the same type.
MotionEvent motionEventA = obtainMotionEvent(MotionEvent.ACTION_MOVE, 1, 2, 9);
@@ -155,6 +159,7 @@ public class FalsingDataProviderTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void test_getAngle() {
MotionEvent motionEventOrigin = obtainMotionEvent(MotionEvent.ACTION_DOWN, 1, 0, 0);
@@ -182,6 +187,7 @@ public class FalsingDataProviderTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void test_isHorizontal() {
MotionEvent motionEventOrigin = obtainMotionEvent(MotionEvent.ACTION_DOWN, 1, 0, 0);
@@ -208,6 +214,7 @@ public class FalsingDataProviderTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void test_isVertical() {
MotionEvent motionEventOrigin = obtainMotionEvent(MotionEvent.ACTION_DOWN, 1, 0, 0);
@@ -234,6 +241,7 @@ public class FalsingDataProviderTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void test_isRight() {
MotionEvent motionEventOrigin = obtainMotionEvent(MotionEvent.ACTION_DOWN, 1, 0, 0);
@@ -260,6 +268,7 @@ public class FalsingDataProviderTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void test_isUp() {
// Remember that our y axis is flipped.

View File

@@ -28,6 +28,7 @@ import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -47,11 +48,13 @@ public class PointerCountClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_noPointer() {
assertThat(mClassifier.isFalseTouch(), is(false));
}
@Test
@Ignore("Memory Leak?")
public void testPass_singlePointer() {
MotionEvent motionEvent = MotionEvent.obtain(1, 1, MotionEvent.ACTION_DOWN, 1, 1, 0);
mClassifier.onTouchEvent(motionEvent);
@@ -60,6 +63,7 @@ public class PointerCountClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testFail_multiPointer() {
MotionEvent.PointerProperties[] pointerProperties =
MotionEvent.PointerProperties.createArray(2);

View File

@@ -34,6 +34,7 @@ import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -64,6 +65,7 @@ public class ProximityClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_uncovered() {
touchDown();
touchUp(10);
@@ -71,6 +73,7 @@ public class ProximityClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_mostlyUncovered() {
touchDown();
mClassifier.onSensorEvent(createSensorEvent(true, 1));
@@ -80,6 +83,7 @@ public class ProximityClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_quickSettings() {
touchDown();
when(mDataProvider.getInteractionType()).thenReturn(QUICK_SETTINGS);
@@ -90,6 +94,7 @@ public class ProximityClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testFail_covered() {
touchDown();
mClassifier.onSensorEvent(createSensorEvent(true, 1));
@@ -99,6 +104,7 @@ public class ProximityClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testFail_mostlyCovered() {
touchDown();
mClassifier.onSensorEvent(createSensorEvent(true, 1));
@@ -110,6 +116,7 @@ public class ProximityClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_coveredWithLongSwipe() {
touchDown();
mClassifier.onSensorEvent(createSensorEvent(true, 1));

View File

@@ -37,6 +37,7 @@ import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -59,6 +60,7 @@ public class TypeClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_QuickSettings() {
when(mDataProvider.getInteractionType()).thenReturn(QUICK_SETTINGS);
when(mDataProvider.isVertical()).thenReturn(true);
@@ -72,6 +74,7 @@ public class TypeClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testFalse_QuickSettings() {
when(mDataProvider.getInteractionType()).thenReturn(QUICK_SETTINGS);
@@ -85,6 +88,7 @@ public class TypeClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_PulseExpand() {
when(mDataProvider.getInteractionType()).thenReturn(PULSE_EXPAND);
when(mDataProvider.isVertical()).thenReturn(true);
@@ -98,6 +102,7 @@ public class TypeClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testFalse_PulseExpand() {
when(mDataProvider.getInteractionType()).thenReturn(PULSE_EXPAND);
@@ -111,6 +116,7 @@ public class TypeClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_NotificationDragDown() {
when(mDataProvider.getInteractionType()).thenReturn(NOTIFICATION_DRAG_DOWN);
when(mDataProvider.isVertical()).thenReturn(true);
@@ -124,6 +130,7 @@ public class TypeClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testFalse_NotificationDragDown() {
when(mDataProvider.getInteractionType()).thenReturn(NOTIFICATION_DRAG_DOWN);
@@ -137,6 +144,7 @@ public class TypeClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_NotificationDismiss() {
when(mDataProvider.getInteractionType()).thenReturn(NOTIFICATION_DISMISS);
when(mDataProvider.isVertical()).thenReturn(false);
@@ -159,6 +167,7 @@ public class TypeClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testFalse_NotificationDismiss() {
when(mDataProvider.getInteractionType()).thenReturn(NOTIFICATION_DISMISS);
when(mDataProvider.isVertical()).thenReturn(true);
@@ -182,6 +191,7 @@ public class TypeClassifierTest extends SysuiTestCase {
@Test
@Ignore("Memory Leak?")
public void testPass_Unlock() {
when(mDataProvider.getInteractionType()).thenReturn(UNLOCK);
when(mDataProvider.isVertical()).thenReturn(true);
@@ -196,6 +206,7 @@ public class TypeClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testFalse_Unlock() {
when(mDataProvider.getInteractionType()).thenReturn(UNLOCK);
@@ -213,6 +224,7 @@ public class TypeClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_BouncerUnlock() {
when(mDataProvider.getInteractionType()).thenReturn(BOUNCER_UNLOCK);
when(mDataProvider.isVertical()).thenReturn(true);
@@ -227,6 +239,7 @@ public class TypeClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testFalse_BouncerUnlock() {
when(mDataProvider.getInteractionType()).thenReturn(BOUNCER_UNLOCK);
@@ -244,6 +257,7 @@ public class TypeClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_LeftAffordance() {
when(mDataProvider.getInteractionType()).thenReturn(LEFT_AFFORDANCE);
when(mDataProvider.isUp()).thenReturn(true);
@@ -258,6 +272,7 @@ public class TypeClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testFalse_LeftAffordance() {
when(mDataProvider.getInteractionType()).thenReturn(LEFT_AFFORDANCE);
@@ -275,6 +290,7 @@ public class TypeClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_RightAffordance() {
when(mDataProvider.getInteractionType()).thenReturn(RIGHT_AFFORDANCE);
when(mDataProvider.isUp()).thenReturn(true);
@@ -289,6 +305,7 @@ public class TypeClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testFalse_RightAffordance() {
when(mDataProvider.getInteractionType()).thenReturn(RIGHT_AFFORDANCE);

View File

@@ -30,6 +30,7 @@ import com.android.systemui.SysuiTestCase;
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;
@@ -85,6 +86,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_fewTouchesVertical() {
assertThat(mClassifier.isFalseTouch(), is(false));
appendMotionEvent(0, 0);
@@ -94,6 +96,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_vertical() {
appendMotionEvent(0, 0);
appendMotionEvent(0, 100);
@@ -102,6 +105,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_fewTouchesHorizontal() {
assertThat(mClassifier.isFalseTouch(), is(false));
appendMotionEvent(0, 0);
@@ -111,6 +115,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_horizontal() {
appendMotionEvent(0, 0);
appendMotionEvent(100, 0);
@@ -120,6 +125,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
@Test
@Ignore("Memory Leak?")
public void testFail_minimumTouchesVertical() {
appendMotionEvent(0, 0);
appendMotionEvent(0, 100);
@@ -128,6 +134,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testFail_minimumTouchesHorizontal() {
appendMotionEvent(0, 0);
appendMotionEvent(100, 0);
@@ -136,6 +143,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_fortyFiveDegreesStraight() {
appendMotionEvent(0, 0);
appendMotionEvent(10, 10);
@@ -144,6 +152,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_horizontalZigZagVerticalStraight() {
// This test looks just like testFail_horizontalZigZagVerticalStraight but with
// a longer y range, making it look straighter.
@@ -154,6 +163,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testPass_horizontalStraightVerticalZigZag() {
// This test looks just like testFail_horizontalStraightVerticalZigZag but with
// a longer x range, making it look straighter.
@@ -164,6 +174,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testFail_horizontalZigZagVerticalStraight() {
// This test looks just like testPass_horizontalZigZagVerticalStraight but with
// a shorter y range, making it look more crooked.
@@ -174,6 +185,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void testFail_horizontalStraightVerticalZigZag() {
// This test looks just like testPass_horizontalStraightVerticalZigZag but with
// a shorter x range, making it look more crooked.
@@ -184,6 +196,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void test_between0And45() {
appendMotionEvent(0, 0);
appendMotionEvent(100, 5);
@@ -210,6 +223,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void test_between45And90() {
appendMotionEvent(0, 0);
appendMotionEvent(10, 50);
@@ -236,6 +250,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void test_between90And135() {
appendMotionEvent(0, 0);
appendMotionEvent(-10, 50);
@@ -262,6 +277,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void test_between135And180() {
appendMotionEvent(0, 0);
appendMotionEvent(-120, 10);
@@ -288,6 +304,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void test_between180And225() {
appendMotionEvent(0, 0);
appendMotionEvent(-120, -10);
@@ -314,6 +331,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void test_between225And270() {
appendMotionEvent(0, 0);
appendMotionEvent(-12, -20);
@@ -340,6 +358,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void test_between270And315() {
appendMotionEvent(0, 0);
appendMotionEvent(12, -20);
@@ -366,6 +385,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void test_between315And360() {
appendMotionEvent(0, 0);
appendMotionEvent(120, -20);
@@ -392,6 +412,7 @@ public class ZigZagClassifierTest extends SysuiTestCase {
}
@Test
@Ignore("Memory Leak?")
public void test_randomOrigins() {
// The purpose of this test is to try all the other tests from different starting points.
// We use a pre-determined seed to make this test repeatable.