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

am: a52b3a7775

Change-Id: I0d1c17c3740983ab0cbc24c2cd0d3a530b56ca99
This commit is contained in:
Benedict Wong
2017-10-24 17:09:28 +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();
}