OSDN Git Service

Fix errorprone build
authorColin Cross <ccross@android.com>
Tue, 29 Aug 2017 19:18:55 +0000 (12:18 -0700)
committerColin Cross <ccross@android.com>
Tue, 29 Aug 2017 19:54:11 +0000 (12:54 -0700)
Fixes:
frameworks/base/tests/net/java/com/android/server/connectivity/tethering/OffloadControllerTest.java:149: error: [JUnit4TestNotRun] Test method will not be run; please add @Test annotation
    public void testNoSettingsValueDefaultDisabledDoesNotStart() throws Exception {
                ^
    (see http://errorprone.info/bugpattern/JUnit4TestNotRun)
  Did you mean '@Test'?
frameworks/base/tests/net/java/com/android/server/connectivity/tethering/OffloadControllerTest.java:170: error: [JUnit4TestNotRun] Test method will not be run; please add @Test annotation
    public void testNoSettingsValueDefaultEnabledDoesStart() throws Exception {
                ^
    (see http://errorprone.info/bugpattern/JUnit4TestNotRun)
  Did you mean '@Test'?

Bug: 64489631
Test: m -j RUN_ERROR_PRONE=true javac-check
Merged-In: Ib32489d07778465134bca52c589baddbd78ab129
Change-Id: I41dfdf87529e532df385617fa05c7006a7a14c86

tests/net/java/com/android/server/connectivity/tethering/OffloadControllerTest.java

index d773951..27e90bc 100644 (file)
@@ -68,6 +68,7 @@ import java.util.Set;
 
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.runner.RunWith;
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;
@@ -144,8 +145,8 @@ public class OffloadControllerTest {
         return offload;
     }
 
-    // TODO: Restore when FakeSettingsProvider.clearSettingsProvider() is available.
-    // @Test
+    @Test
+    @Ignore("Restore when FakeSettingsProvider.clearSettingsProvider() is available.")
     public void testNoSettingsValueDefaultDisabledDoesNotStart() throws Exception {
         setupFunctioningHardwareInterface();
         when(mHardware.getDefaultTetherOffloadDisabled()).thenReturn(1);
@@ -165,8 +166,8 @@ public class OffloadControllerTest {
         inOrder.verifyNoMoreInteractions();
     }
 
-    // TODO: Restore when FakeSettingsProvider.clearSettingsProvider() is available.
-    // @Test
+    @Test
+    @Ignore("Restore when FakeSettingsProvider.clearSettingsProvider() is available.")
     public void testNoSettingsValueDefaultEnabledDoesStart() throws Exception {
         setupFunctioningHardwareInterface();
         when(mHardware.getDefaultTetherOffloadDisabled()).thenReturn(0);