Changeset 14512 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2018-12-05T00:59:31+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java
r14507 r14512 81 81 throws IOException { 82 82 TileXY xy = tileSource.latLonToTileXY(center, zoom); 83 checkUrl(info, tileSource.getTileUrl(zoom, xy.getXIndex(), xy.getYIndex())); 83 for (int i = 0; i < 3; i++) { 84 try { 85 checkUrl(info, tileSource.getTileUrl(zoom, xy.getXIndex(), xy.getYIndex())); 86 return; 87 } catch (IOException e) { 88 // Try up to three times max to allow Bing source to initialize itself 89 // and avoid random network errors 90 Logging.trace(e); 91 if (i == 2) { 92 throw e; 93 } 94 try { 95 Thread.sleep(500); 96 } catch (InterruptedException ex) { 97 Logging.warn(ex); 98 } 99 } 100 } 84 101 } 85 102 … … 118 135 switch (info.getImageryType()) { 119 136 case BING: 120 return new BingAerialTileSource( );137 return new BingAerialTileSource(info); 121 138 case SCANEX: 122 139 return new ScanexTileSource(info);
Note:
See TracChangeset
for help on using the changeset viewer.