Fix testUidCache_switchLocale_shouldCleanCache in BatteryEntryTest
Remove unused code and test Bug: 290318160 Fix: 290318160 Test: presubmit Change-Id: I20c612270c67f55e0b01fa849514ba670b696db3
This commit is contained in:
@@ -50,8 +50,6 @@ import org.mockito.junit.MockitoRule;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.RuntimeEnvironment;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
public class BatteryEntryTest {
|
||||
|
||||
@@ -232,17 +230,6 @@ public class BatteryEntryTest {
|
||||
assertThat(entry.getTimeInBackgroundMs()).isEqualTo(0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUidCache_switchLocale_shouldCleanCache() {
|
||||
Locale.setDefault(new Locale("en_US"));
|
||||
BatteryEntry.sUidCache.put(Integer.toString(APP_UID), null);
|
||||
assertThat(BatteryEntry.sUidCache).isNotEmpty();
|
||||
|
||||
Locale.setDefault(new Locale("zh_TW"));
|
||||
createBatteryEntryForApp(null, null, HIGH_DRAIN_PACKAGE);
|
||||
assertThat(BatteryEntry.sUidCache).isEmpty(); // check if cache is clear
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getKey_UidBatteryConsumer() {
|
||||
final BatteryEntry entry = createBatteryEntryForApp(null, null, null);
|
||||
|
Reference in New Issue
Block a user