Bug 1411654 - Pre: Clear icon disk storage in test. r=mcomella
authorNick Alexander <nalexander@mozilla.com>
Tue, 07 Nov 2017 20:24:04 -0800
changeset 453608 373c9a71d9451498462594b302b4fe2648431fef
parent 453607 3dc3beab95f83b2f08ff9ff305fdd4b85cc05d9d
child 453609 901b304603d9d4816856d560c61387501efceadc
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcomella
bugs1411654
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1411654 - Pre: Clear icon disk storage in test. r=mcomella Newer versions of Robolectric seem to have different semantics about clearing disk caches, so this is necessary. But for older versions, it shouldn't hurt, and is slightly more clear than relying on an implicit clear. MozReview-Commit-ID: LRcaEPasXj8
mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestLookupIconUrl.java
--- a/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestLookupIconUrl.java
+++ b/mobile/android/app/src/test/java/org/mozilla/gecko/icons/preparation/TestLookupIconUrl.java
@@ -23,16 +23,17 @@ public class TestLookupIconUrl {
     private static final String TEST_ICON_URL_2 = "http://example.org/favicon.ico";
     private static final String TEST_ICON_URL_3 = "http://example.com/favicon.ico";
     private static final String TEST_ICON_URL_4 = "http://example.net/favicon.ico";
 
 
     @Before
     public void setUp() {
         MemoryStorage.get().evictAll();
+        DiskStorage.get(RuntimeEnvironment.application).evictAll();
     }
 
     @Test
     public void testNoIconUrlIsAddedByDefault() {
         final IconRequest request = Icons.with(RuntimeEnvironment.application)
                 .pageUrl(TEST_PAGE_URL)
                 .build();