Merge "Verify duplicate upstream notifications are ignored" am: 3d57eb0bdc

am: 02e71f6245

Change-Id: I0e62e4f6f371aa43eae1a0e5c62787c4e84ddd9a
This commit is contained in:
Erik Kline
2017-02-14 09:45:56 +00:00
committed by android-build-merger

View File

@@ -294,6 +294,18 @@ public class TetherInterfaceStateMachineTest {
IFACE_NAME, mTestedSm, STATE_AVAILABLE, TETHER_ERROR_ENABLE_NAT_ERROR);
}
@Test
public void ignoresDuplicateUpstreamNotifications() throws Exception {
initTetheredStateMachine(TETHERING_WIFI, UPSTREAM_IFACE);
verifyNoMoreInteractions(mNMService, mStatsService, mTetherHelper);
for (int i = 0; i < 5; i++) {
dispatchTetherConnectionChanged(UPSTREAM_IFACE);
verifyNoMoreInteractions(mNMService, mStatsService, mTetherHelper);
}
}
/**
* Send a command to the state machine under test, and run the event loop to idle.
*