Fixed flaky unit tests
[android/platform/frameworks/opt/telephony.git] / tests / telephonytests / src / com / android / internal / telephony / CarrierActionAgentTest.java
index c6a0163..a402f12 100644 (file)
  */
 package com.android.internal.telephony;
 
+import static com.android.internal.telephony.TelephonyTestUtils.waitForMs;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Matchers.anyLong;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.verify;
+
 import android.database.ContentObserver;
 import android.net.Uri;
 import android.os.Bundle;
@@ -32,13 +39,6 @@ import org.junit.Test;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
 
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.anyLong;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.verify;
-
-import static com.android.internal.telephony.TelephonyTestUtils.waitForMs;
-
 public class CarrierActionAgentTest extends TelephonyTest {
     private CarrierActionAgent mCarrierActionAgentUT;
     private FakeContentResolver mFakeContentResolver;
@@ -126,6 +126,7 @@ public class CarrierActionAgentTest extends TelephonyTest {
 
         verify(mRadioActionHandler).sendMessageAtTime(message.capture(), anyLong());
         assertEquals(RADIO_CARRIER_ACTION_EVENT, message.getValue().what);
+        Settings.Global.putInt(mFakeContentResolver, Settings.Global.AIRPLANE_MODE_ON, 0);
     }
 
     @After