diff options
author | Sreeram Ramachandran <sreeram@google.com> | 2014-04-16 10:56:07 -0700 |
---|---|---|
committer | Lorenzo Colitti <lorenzo@google.com> | 2014-05-14 03:56:33 -0700 |
commit | 4ddebf7f5b85d082c56f6a8aad11bd0c5ca68fde (patch) | |
tree | f67bc88a47d8fa946c8acaba36b20e1b16b53fc9 /services/tests/servicestests | |
parent | b2829fa165124264c7ec06a6e23b08a1d97b99e5 (diff) | |
download | frameworks_base-4ddebf7f5b85d082c56f6a8aad11bd0c5ca68fde.zip frameworks_base-4ddebf7f5b85d082c56f6a8aad11bd0c5ca68fde.tar.gz frameworks_base-4ddebf7f5b85d082c56f6a8aad11bd0c5ca68fde.tar.bz2 |
Fix build.
Change-Id: I5dab09d2d8a9cff56fa17bb4e8c14b365449399b
Diffstat (limited to 'services/tests/servicestests')
-rw-r--r-- | services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java b/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java index b4a02f1..88aaafc 100644 --- a/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java @@ -163,9 +163,10 @@ public class ConnectivityServiceTest extends AndroidTestCase { nextConnBroadcast.get(); // verify that both routes were added and DNS was flushed - verify(mNetManager).addRoute(eq(MOBILE_IFACE), eq(MOBILE_ROUTE_V4)); - verify(mNetManager).addRoute(eq(MOBILE_IFACE), eq(MOBILE_ROUTE_V6)); - verify(mNetManager).flushNetworkDnsCache(mMobile.tracker.getNetwork().netId); + int mobileNetId = mMobile.tracker.getNetwork().netId; + verify(mNetManager).addRoute(eq(mobileNetId), eq(MOBILE_ROUTE_V4)); + verify(mNetManager).addRoute(eq(mobileNetId), eq(MOBILE_ROUTE_V6)); + verify(mNetManager).flushNetworkDnsCache(mobileNetId); } @@ -200,11 +201,14 @@ public class ConnectivityServiceTest extends AndroidTestCase { nextConnBroadcast.get(); // verify that wifi routes added, and teardown requested - verify(mNetManager).addRoute(eq(WIFI_IFACE), eq(WIFI_ROUTE_V4)); - verify(mNetManager).addRoute(eq(WIFI_IFACE), eq(WIFI_ROUTE_V6)); - verify(mNetManager).flushNetworkDnsCache(mWifi.tracker.getNetwork().netId); + int wifiNetId = mWifi.tracker.getNetwork().netId; + verify(mNetManager).addRoute(eq(wifiNetId), eq(WIFI_ROUTE_V4)); + verify(mNetManager).addRoute(eq(wifiNetId), eq(WIFI_ROUTE_V6)); + verify(mNetManager).flushNetworkDnsCache(wifiNetId); verify(mMobile.tracker).teardown(); + int mobileNetId = mMobile.tracker.getNetwork().netId; + reset(mNetManager, mMobile.tracker); // tear down mobile network, as requested @@ -216,8 +220,8 @@ public class ConnectivityServiceTest extends AndroidTestCase { mTrackerHandler.obtainMessage(EVENT_STATE_CHANGED, mMobile.info).sendToTarget(); nextConnBroadcast.get(); - verify(mNetManager).removeRoute(eq(MOBILE_IFACE), eq(MOBILE_ROUTE_V4)); - verify(mNetManager).removeRoute(eq(MOBILE_IFACE), eq(MOBILE_ROUTE_V6)); + verify(mNetManager).removeRoute(eq(mobileNetId), eq(MOBILE_ROUTE_V4)); + verify(mNetManager).removeRoute(eq(mobileNetId), eq(MOBILE_ROUTE_V6)); } |