зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1214980 - Update testDistribution to retry on NoSuchElementException; r=margaret
This commit is contained in:
Родитель
9e46c1065d
Коммит
aa92792c64
|
@ -13,6 +13,7 @@ import java.net.HttpURLConnection;
|
|||
import java.net.URI;
|
||||
import java.util.Locale;
|
||||
import java.util.jar.JarInputStream;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
@ -137,7 +138,14 @@ public class testDistribution extends ContentProviderTest {
|
|||
// Pre-clear distribution pref, run basic preferences and en-US localized preferences Tests
|
||||
clearDistributionPref();
|
||||
setTestLocale("en-US");
|
||||
initDistribution(mockPackagePath);
|
||||
try {
|
||||
initDistribution(mockPackagePath);
|
||||
} catch(NoSuchElementException e) {
|
||||
// TODO: determine why this exception is intermittently thrown
|
||||
Log.w(LOGTAG, "NoSuchElementException on first initDistribution -- will retry");
|
||||
mSolo.sleep(4000);
|
||||
initDistribution(mockPackagePath);
|
||||
}
|
||||
checkPreferences();
|
||||
checkAndroidPreferences();
|
||||
checkLocalizedPreferences("en-US");
|
||||
|
|
Загрузка…
Ссылка в новой задаче