Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java	(revision 14511)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java	(revision 14512)
@@ -81,5 +81,22 @@
             throws IOException {
         TileXY xy = tileSource.latLonToTileXY(center, zoom);
-        checkUrl(info, tileSource.getTileUrl(zoom, xy.getXIndex(), xy.getYIndex()));
+        for (int i = 0; i < 3; i++) {
+            try {
+                checkUrl(info, tileSource.getTileUrl(zoom, xy.getXIndex(), xy.getYIndex()));
+                return;
+            } catch (IOException e) {
+                // Try up to three times max to allow Bing source to initialize itself
+                // and avoid random network errors
+                Logging.trace(e);
+                if (i == 2) {
+                    throw e;
+                }
+                try {
+                    Thread.sleep(500);
+                } catch (InterruptedException ex) {
+                    Logging.warn(ex);
+                }
+            }
+        }
     }
 
@@ -118,5 +135,5 @@
         switch (info.getImageryType()) {
             case BING:
-                return new BingAerialTileSource();
+                return new BingAerialTileSource(info);
             case SCANEX:
                 return new ScanexTileSource(info);
