Merge "Fix TetheringTest.failureEnablingIpForwarding verification count" into main
This commit is contained in:
commit
856f57a0ce
1 changed files with 3 additions and 3 deletions
|
|
@ -2030,7 +2030,7 @@ public class TetheringTest {
|
||||||
@Test
|
@Test
|
||||||
public void failureEnablingIpForwarding() throws Exception {
|
public void failureEnablingIpForwarding() throws Exception {
|
||||||
initTetheringOnTestThread();
|
initTetheringOnTestThread();
|
||||||
when(mWifiManager.startTetheredHotspot(any(SoftApConfiguration.class))).thenReturn(true);
|
when(mWifiManager.startTetheredHotspot(null)).thenReturn(true);
|
||||||
doThrow(new RemoteException()).when(mNetd).ipfwdEnableForwarding(TETHERING_NAME);
|
doThrow(new RemoteException()).when(mNetd).ipfwdEnableForwarding(TETHERING_NAME);
|
||||||
|
|
||||||
// Emulate pressing the WiFi tethering button.
|
// Emulate pressing the WiFi tethering button.
|
||||||
|
|
@ -2080,9 +2080,9 @@ public class TetheringTest {
|
||||||
TEST_WLAN_IFNAME, WifiManager.IFACE_IP_MODE_CONFIGURATION_ERROR);
|
TEST_WLAN_IFNAME, WifiManager.IFACE_IP_MODE_CONFIGURATION_ERROR);
|
||||||
|
|
||||||
verify(mTetheringMetrics, times(0)).maybeUpdateUpstreamType(any());
|
verify(mTetheringMetrics, times(0)).maybeUpdateUpstreamType(any());
|
||||||
verify(mTetheringMetrics, times(2)).updateErrorCode(eq(TETHERING_WIFI),
|
verify(mTetheringMetrics, times(1)).updateErrorCode(eq(TETHERING_WIFI),
|
||||||
eq(TETHER_ERROR_INTERNAL_ERROR));
|
eq(TETHER_ERROR_INTERNAL_ERROR));
|
||||||
verify(mTetheringMetrics, times(2)).sendReport(eq(TETHERING_WIFI));
|
verify(mTetheringMetrics, times(1)).sendReport(eq(TETHERING_WIFI));
|
||||||
|
|
||||||
verifyNoMoreInteractions(mWifiManager);
|
verifyNoMoreInteractions(mWifiManager);
|
||||||
verifyNoMoreInteractions(mNetd);
|
verifyNoMoreInteractions(mNetd);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue