summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Paul Hu <paulhu@google.com> 2019-05-14 21:35:43 -0700
committer android-build-merger <android-build-merger@google.com> 2019-05-14 21:35:43 -0700
commit273f61880e39f1dd66f48091c90c90b66de75890 (patch)
treed8070ca5b78170696d0ce3df05317aaf6cc2b493
parente2fb55037a5af8f7c84ce13be444959c057fb92c (diff)
parentf672e96b8720b397e6a440b931dbd34d39167211 (diff)
Merge "Ignore NetworkTest when running CtsNetTestCases in instant app mode" am: 910b72f109
am: f672e96b87 Change-Id: Ia28eea113e19b9c44998677e5b8093be178a06a3
-rw-r--r--tests/net/common/Android.bp1
-rw-r--r--tests/net/common/java/android/net/NetworkTest.java2
2 files changed, 3 insertions, 0 deletions
diff --git a/tests/net/common/Android.bp b/tests/net/common/Android.bp
index 07525a6ea49c..db1ccb446ce3 100644
--- a/tests/net/common/Android.bp
+++ b/tests/net/common/Android.bp
@@ -24,6 +24,7 @@ java_library {
"frameworks-net-testutils",
"junit",
"mockito-target-minus-junit4",
+ "platform-test-annotations",
],
libs: [
"android.test.base.stubs",
diff --git a/tests/net/common/java/android/net/NetworkTest.java b/tests/net/common/java/android/net/NetworkTest.java
index bef66b27df62..38bc744a0a06 100644
--- a/tests/net/common/java/android/net/NetworkTest.java
+++ b/tests/net/common/java/android/net/NetworkTest.java
@@ -25,6 +25,7 @@ import android.net.LocalServerSocket;
import android.net.LocalSocket;
import android.net.LocalSocketAddress;
import android.net.Network;
+import android.platform.test.annotations.AppModeFull;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
@@ -74,6 +75,7 @@ public class NetworkTest {
}
@Test
+ @AppModeFull(reason = "Socket cannot bind in instant app mode")
public void testBindSocketOfConnectedDatagramSocketThrows() throws Exception {
final DatagramSocket mDgramSocket = new DatagramSocket(0, (InetAddress) Inet6Address.ANY);
mDgramSocket.connect((InetAddress) Inet6Address.LOOPBACK, 53);