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

Commit 8ff89cc5 authored by Jordan Liu's avatar Jordan Liu Committed by Gerrit Code Review
Browse files

Merge "Mark top flaky test @FlakyTest"

parents 6d905015 5f57b14e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -17,6 +17,9 @@
package com.android.internal.telephony;

import static com.android.internal.telephony.TelephonyTestUtils.waitForMs;

import android.support.test.filters.FlakyTest;

import junit.framework.TestCase;

public class ClientWakelockTrackerTest extends TestCase {
@@ -35,6 +38,7 @@ public class ClientWakelockTrackerTest extends TestCase {
    client "PQR" sends a message at t+20 and gets response at t+120. Verify that
    "ABC" is attributed 30ms and "PQR" 90ms of the total wakelock time of 120ms
     */
    @FlakyTest /* flakes 0.37% of the time */
    public void testTwoClients() throws Exception {
        myTracker.startTracking("ABC", 101, 1, 1);
        waitForMs(20);
@@ -69,6 +73,7 @@ public class ClientWakelockTrackerTest extends TestCase {
    and sends another message at t+20 and gets response at t+120. Verify that
    "ABC" is attributed 120ms
     */
    @FlakyTest /* flakes 0.37% of the time */
    public void testOneClient() throws Exception {
        myTracker.startTracking("ABC", 101, 1, 1);
        waitForMs(20);
@@ -95,6 +100,7 @@ public class ClientWakelockTrackerTest extends TestCase {
    /* This test has client "ABC" send 1 message at time t and another at time t+20
    and gets response for all at t+40. Verify that "ABC" is attributed 40ms
     */
    @FlakyTest /* flakes 0.37% of the time */
    public void testStopTrackingAllOneClient() throws Exception {
        myTracker.startTracking("ABC", 101, 1, 1);
        waitForMs(20);
+1 −0
Original line number Diff line number Diff line
@@ -271,6 +271,7 @@ public class GsmCdmaCallTrackerTest extends TelephonyTest {
        assertEquals(0, mCTUT.mRingingCall.getConnections().size());
    }

    @FlakyTest /* flakes 2.57% of the time */
    @Test
    @SmallTest
    public void testMTCallReject() {
+2 −0
Original line number Diff line number Diff line
@@ -640,6 +640,7 @@ public class ServiceStateTrackerTest extends TelephonyTest {
        assertEquals(3, cl.getCid());
    }

    @FlakyTest /* flakes 0.86% of the time */
    @Test
    @MediumTest
    public void testUpdatePhoneType() {
@@ -1011,6 +1012,7 @@ public class ServiceStateTrackerTest extends TelephonyTest {
                ((AsyncResult)messageArgumentCaptor.getValue().obj).result);
    }

    @FlakyTest /* flakes 0.43% of the time */
    @Test
    @MediumTest
    public void testRegAndUnregForNetworkAttached() throws Exception {
+3 −9
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import static com.android.internal.telephony.TelephonyTestUtils.waitForMs;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.isNull;
@@ -32,11 +31,6 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

import android.app.ActivityManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.HandlerThread;
import android.os.Message;
import android.provider.Telephony.Sms.Intents;
@@ -126,7 +120,7 @@ public class SmsDispatchersControllerTest extends TelephonyTest {
                anyInt(), anyInt(), any(Message.class));
    }

    @Test @SmallTest
    @Test @SmallTest @FlakyTest /* flakes 0.73% of the time on gce, 0.57% on marlin */
    public void testSendImsCdmaTest() throws Exception {
        switchImsSmsFormat(PhoneConstants.PHONE_TYPE_CDMA);
        mSmsDispatchersController.sendText("111"/* desAddr*/, "222" /*scAddr*/, TAG,
@@ -135,7 +129,7 @@ public class SmsDispatchersControllerTest extends TelephonyTest {
                any(Message.class));
    }

    @Test @SmallTest
    @Test @SmallTest @FlakyTest /* flakes 0.71% of the time on marlin, 0.61% on gce */
    public void testSendRetrySmsCdmaTest() throws Exception {
        // newFormat will be based on voice technology
        ArgumentCaptor<byte[]> captor = ArgumentCaptor.forClass(byte[].class);
@@ -150,7 +144,7 @@ public class SmsDispatchersControllerTest extends TelephonyTest {
        assertNull(captor.getAllValues().get(0));
    }

    @Test @SmallTest
    @Test @SmallTest @FlakyTest /* flakes 0.85% of the time on gce, 0.43% on marlin */
    public void testSendRetrySmsGsmTest() throws Exception {
        // newFormat will be based on voice technology will be GSM if phone type is not CDMA
        switchImsSmsFormat(PhoneConstants.PHONE_TYPE_GSM);
+1 −0
Original line number Diff line number Diff line
@@ -209,6 +209,7 @@ public class CdmaInboundSmsHandlerTest extends TelephonyTest {
        assertEquals("IdleState", getCurrentState().getName());
    }

    @FlakyTest /* flakes 0.43% of the time */
    @Test
    @MediumTest
    public void testNewSmsFromBlockedNumber_noBroadcastsSent() {
Loading