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

Commit 7b66e7d3 authored by paulhu's avatar paulhu
Browse files

Ignore NetworkTest when running CtsNetTestCases in instant app mode

Ignore NetworkTest#testBindSocketOfConnectedDatagramSocketThrows
when running CtsNetTestCases in instant app mode due to sockect
cannot bind in instant app mode.

Bug: 123366918
Test: atest CtsNetTestCases --instant
Test: atest FrameworksNetTests
Change-Id: I37e5988b36213a6f47b51a681db1cf2614041cee
parent 1c9ca3b0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ java_library {
        "frameworks-net-testutils",
        "junit",
        "mockito-target-minus-junit4",
        "platform-test-annotations",
    ],
    libs: [
        "android.test.base.stubs",
+2 −0
Original line number Diff line number Diff line
@@ -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);