Merge changes from topic "hostsidevpntestflaky" into main
* changes:
Skip presubmit for flaky tests in FrameworksNetTests due to Out of SLO
Skip presubmit for flaky tests in HostsideVpnTests due to Out of SLO
diff --git a/Cronet/tests/cts/src/android/net/http/cts/BidirectionalStreamTest.kt b/Cronet/tests/cts/src/android/net/http/cts/BidirectionalStreamTest.kt
index 3a77097..464862d 100644
--- a/Cronet/tests/cts/src/android/net/http/cts/BidirectionalStreamTest.kt
+++ b/Cronet/tests/cts/src/android/net/http/cts/BidirectionalStreamTest.kt
@@ -27,6 +27,7 @@
import androidx.test.core.app.ApplicationProvider
import com.android.testutils.DevSdkIgnoreRule
import com.android.testutils.DevSdkIgnoreRunner
+import com.android.testutils.SkipPresubmit
import com.google.common.truth.Truth.assertThat
import kotlin.test.Test
import kotlin.test.assertEquals
@@ -35,7 +36,6 @@
import org.junit.After
import org.junit.AssumptionViolatedException
import org.junit.Before
-import org.junit.Ignore
import org.junit.runner.RunWith
private const val URL = "https://source.android.com"
@@ -69,7 +69,7 @@
@Test
@Throws(Exception::class)
- @Ignore("b/292298108 Re-enable and confirm non-flaky after SLO")
+ @SkipPresubmit(reason = "b/293141085 Confirm non-flaky and move to presubmit after SLO")
fun testBidirectionalStream_GetStream_CompletesSuccessfully() {
stream = createBidirectionalStreamBuilder(URL).setHttpMethod("GET").build()
stream!!.start()
diff --git a/Cronet/tests/mts/jarjar_excludes.txt b/Cronet/tests/mts/jarjar_excludes.txt
index a3e86de..e8fd39b 100644
--- a/Cronet/tests/mts/jarjar_excludes.txt
+++ b/Cronet/tests/mts/jarjar_excludes.txt
@@ -1,5 +1,8 @@
-# It's prohibited to jarjar androidx packages
+# jarjar-gen can't handle some kotlin object expression, exclude packages that include them
androidx\..+
+kotlin\.test\..+
+kotlin\.reflect\..+
+org\.mockito\..+
# Do not jarjar the api classes
android\.net\..+
# cronet_tests.so is not jarjared and uses base classes. We can remove this when there's a
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 1e110f5..1a937be 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -105,6 +105,9 @@
"name": "NetHttpCoverageTests",
"options": [
{
+ "exclude-annotation": "com.android.testutils.SkipPresubmit"
+ },
+ {
// These sometimes take longer than 1 min which is the presubmit timeout
"exclude-annotation": "androidx.test.filters.LargeTest"
}
@@ -234,6 +237,9 @@
"name": "NetHttpCoverageTests[CaptivePortalLoginGoogle.apk+NetworkStackGoogle.apk+com.google.android.resolv.apex+com.google.android.tethering.apex]",
"options": [
{
+ "exclude-annotation": "com.android.testutils.SkipPresubmit"
+ },
+ {
// These sometimes take longer than 1 min which is the presubmit timeout
"exclude-annotation": "androidx.test.filters.LargeTest"
}
diff --git a/tests/cts/net/src/android/net/cts/ConnectivityManagerTest.java b/tests/cts/net/src/android/net/cts/ConnectivityManagerTest.java
index a0508e1..5f4eb7c 100644
--- a/tests/cts/net/src/android/net/cts/ConnectivityManagerTest.java
+++ b/tests/cts/net/src/android/net/cts/ConnectivityManagerTest.java
@@ -2560,10 +2560,9 @@
assertThrows(SecurityException.class, () -> mCm.factoryReset());
}
- // @AppModeFull(reason = "Cannot get WifiManager in instant app mode")
- // @Test
- // Temporarily disable the unreliable test, which is blocked by b/254183718.
- private void testFactoryReset() throws Exception {
+ @AppModeFull(reason = "Cannot get WifiManager in instant app mode")
+ @Test
+ public void testFactoryReset() throws Exception {
assumeTrue(TestUtils.shouldTestSApis());
// Store current settings.
@@ -2592,6 +2591,7 @@
// prevent the race condition between airplane mode enabled and the followed
// up wifi tethering enabled.
tetherEventCallback.expectNoTetheringActive();
+ tetherUtils.expectSoftApDisabled();
// start wifi tethering
tetherUtils.startWifiTethering(tetherEventCallback);
diff --git a/tests/unit/java/com/android/server/connectivity/VpnTest.java b/tests/unit/java/com/android/server/connectivity/VpnTest.java
index c13b063..2726267 100644
--- a/tests/unit/java/com/android/server/connectivity/VpnTest.java
+++ b/tests/unit/java/com/android/server/connectivity/VpnTest.java
@@ -2475,7 +2475,8 @@
if (expectedReadFromCarrierConfig) {
final ArgumentCaptor<NetworkCapabilities> ncCaptor =
ArgumentCaptor.forClass(NetworkCapabilities.class);
- verify(mMockNetworkAgent).doSendNetworkCapabilities(ncCaptor.capture());
+ verify(mMockNetworkAgent, timeout(TEST_TIMEOUT_MS))
+ .doSendNetworkCapabilities(ncCaptor.capture());
final VpnTransportInfo info =
(VpnTransportInfo) ncCaptor.getValue().getTransportInfo();