Merge changes I303d1102,I72c9aa43,If13a5284
am: 1aaf45bf89
Change-Id: I402de7fe5fc0e9bf56dc42f4c956c511baee78ab
This commit is contained in:
@@ -99,8 +99,12 @@ public class NetworkManagementServiceTest {
|
|||||||
|
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
if (mSocket != null) mSocket.close();
|
mNMService.shutdown();
|
||||||
if (mServerSocket != null) mServerSocket.close();
|
// Once NetworkManagementService#shutdown() actually does something and shutdowns
|
||||||
|
// the underlying NativeDaemonConnector, the block below should be uncommented.
|
||||||
|
// if (mOutputStream != null) mOutputStream.close();
|
||||||
|
// if (mSocket != null) mSocket.close();
|
||||||
|
// if (mServerSocket != null) mServerSocket.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ import org.mockito.ArgumentCaptor;
|
|||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
import org.mockito.MockitoAnnotations;
|
import org.mockito.MockitoAnnotations;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
@@ -175,7 +174,6 @@ public class IpConnectivityMetricsTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
|
||||||
public void testDefaultNetworkEvents() throws Exception {
|
public void testDefaultNetworkEvents() throws Exception {
|
||||||
final long cell = BitUtils.packBits(new int[]{NetworkCapabilities.TRANSPORT_CELLULAR});
|
final long cell = BitUtils.packBits(new int[]{NetworkCapabilities.TRANSPORT_CELLULAR});
|
||||||
final long wifi = BitUtils.packBits(new int[]{NetworkCapabilities.TRANSPORT_WIFI});
|
final long wifi = BitUtils.packBits(new int[]{NetworkCapabilities.TRANSPORT_WIFI});
|
||||||
@@ -294,7 +292,6 @@ public class IpConnectivityMetricsTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
|
||||||
public void testEndToEndLogging() throws Exception {
|
public void testEndToEndLogging() throws Exception {
|
||||||
// TODO: instead of comparing textpb to textpb, parse textpb and compare proto to proto.
|
// TODO: instead of comparing textpb to textpb, parse textpb and compare proto to proto.
|
||||||
IpConnectivityLog logger = new IpConnectivityLog(mService.impl);
|
IpConnectivityLog logger = new IpConnectivityLog(mService.impl);
|
||||||
@@ -635,6 +632,7 @@ public class IpConnectivityMetricsTest {
|
|||||||
when(nai.getCurrentScore()).thenReturn(score);
|
when(nai.getCurrentScore()).thenReturn(score);
|
||||||
nai.linkProperties = new LinkProperties();
|
nai.linkProperties = new LinkProperties();
|
||||||
nai.networkCapabilities = new NetworkCapabilities();
|
nai.networkCapabilities = new NetworkCapabilities();
|
||||||
|
nai.lastValidated = true;
|
||||||
for (int t : BitUtils.unpackBits(transports)) {
|
for (int t : BitUtils.unpackBits(transports)) {
|
||||||
nai.networkCapabilities.addTransportType(t);
|
nai.networkCapabilities.addTransportType(t);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user