Merge "Return a port from bindToPort() in IpSecService" am: 51de41dea2

am: 0d4a1ae642

Change-Id: Ie59d496a38bf9775c1f40a543a24cb3fec5719bf
This commit is contained in:
Benedict Wong
2017-10-24 16:54:57 +00:00
committed by android-build-merger

View File

@@ -21,6 +21,7 @@ import static android.system.OsConstants.EADDRINUSE;
import static android.system.OsConstants.IPPROTO_UDP;
import static android.system.OsConstants.SOCK_DGRAM;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
@@ -174,6 +175,7 @@ public class IpSecServiceTest {
mIpSecService.openUdpEncapsulationSocket(0, new Binder());
assertNotNull(udpEncapResp);
assertEquals(IpSecManager.Status.OK, udpEncapResp.status);
assertNotEquals(0, udpEncapResp.port);
mIpSecService.closeUdpEncapsulationSocket(udpEncapResp.resourceId);
udpEncapResp.fileDescriptor.close();
}