Loading tests/unit/src/com/android/server/connectivity/NetworkMonitorTest.java +3 −4 Original line number Original line Diff line number Diff line Loading @@ -1931,12 +1931,11 @@ public class NetworkMonitorTest { throws Exception { throws Exception { assumeTrue(ShimUtils.isReleaseOrDevelopmentApiAbove(Build.VERSION_CODES.Q)); assumeTrue(ShimUtils.isReleaseOrDevelopmentApiAbove(Build.VERSION_CODES.Q)); setupTcpDataStall(); setupTcpDataStall(); setTcpPollingInterval(0); // NM suspects data stall from TCP signal and sends data stall metrics. // NM suspects data stall from TCP signal and sends data stall metrics. setDataStallEvaluationType(DATA_STALL_EVALUATION_TYPE_TCP); setDataStallEvaluationType(DATA_STALL_EVALUATION_TYPE_TCP); final WrappedNetworkMonitor nm = prepareNetworkMonitorForVerifyDataStall(nc); final WrappedNetworkMonitor nm = prepareNetworkMonitorForVerifyDataStall(nc); // Trigger a tcp event immediately. // Trigger a tcp event immediately. setTcpPollingInterval(0); nm.sendTcpPollingEvent(); nm.sendTcpPollingEvent(); // Allow only one transport type in the context of this test for simplification. // Allow only one transport type in the context of this test for simplification. final int[] transports = nc.getTransportTypes(); final int[] transports = nc.getTransportTypes(); Loading Loading @@ -2546,8 +2545,8 @@ public class NetworkMonitorTest { } } private void setTcpPollingInterval(int time) { private void setTcpPollingInterval(int time) { when(mDependencies.getDeviceConfigPropertyInt(any(), doReturn(time).when(mDependencies).getDeviceConfigPropertyInt(any(), eq(CONFIG_DATA_STALL_TCP_POLLING_INTERVAL), anyInt())).thenReturn(time); eq(CONFIG_DATA_STALL_TCP_POLLING_INTERVAL), anyInt()); } } private void setFallbackUrl(String url) { private void setFallbackUrl(String url) { Loading Loading
tests/unit/src/com/android/server/connectivity/NetworkMonitorTest.java +3 −4 Original line number Original line Diff line number Diff line Loading @@ -1931,12 +1931,11 @@ public class NetworkMonitorTest { throws Exception { throws Exception { assumeTrue(ShimUtils.isReleaseOrDevelopmentApiAbove(Build.VERSION_CODES.Q)); assumeTrue(ShimUtils.isReleaseOrDevelopmentApiAbove(Build.VERSION_CODES.Q)); setupTcpDataStall(); setupTcpDataStall(); setTcpPollingInterval(0); // NM suspects data stall from TCP signal and sends data stall metrics. // NM suspects data stall from TCP signal and sends data stall metrics. setDataStallEvaluationType(DATA_STALL_EVALUATION_TYPE_TCP); setDataStallEvaluationType(DATA_STALL_EVALUATION_TYPE_TCP); final WrappedNetworkMonitor nm = prepareNetworkMonitorForVerifyDataStall(nc); final WrappedNetworkMonitor nm = prepareNetworkMonitorForVerifyDataStall(nc); // Trigger a tcp event immediately. // Trigger a tcp event immediately. setTcpPollingInterval(0); nm.sendTcpPollingEvent(); nm.sendTcpPollingEvent(); // Allow only one transport type in the context of this test for simplification. // Allow only one transport type in the context of this test for simplification. final int[] transports = nc.getTransportTypes(); final int[] transports = nc.getTransportTypes(); Loading Loading @@ -2546,8 +2545,8 @@ public class NetworkMonitorTest { } } private void setTcpPollingInterval(int time) { private void setTcpPollingInterval(int time) { when(mDependencies.getDeviceConfigPropertyInt(any(), doReturn(time).when(mDependencies).getDeviceConfigPropertyInt(any(), eq(CONFIG_DATA_STALL_TCP_POLLING_INTERVAL), anyInt())).thenReturn(time); eq(CONFIG_DATA_STALL_TCP_POLLING_INTERVAL), anyInt()); } } private void setFallbackUrl(String url) { private void setFallbackUrl(String url) { Loading