Merge "Return a port from bindToPort() in IpSecService"
This commit is contained in:
commit
51de41dea2
1 changed files with 2 additions and 0 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue