Changeset 13742 in josm for trunk/test/unit/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJobTest.java
- Timestamp:
- 2018-05-13T09:15:34+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJobTest.java
r13733 r13742 68 68 private String key; 69 69 70 TestCachedTileLoaderJob(TileLoaderListener listener, Tile tile, String key) throws IOException {71 this(listener, tile, key, (int) TimeUnit.DAYS.toSeconds(1));72 } 73 74 TestCachedTileLoaderJob(TileLoaderListener listener, Tile tile, String key, int minimumExpiry) throws IOException {70 TestCachedTileLoaderJob(TileLoaderListener listener, Tile tile, String key) throws IOException { 71 this(listener, tile, key, (int) TimeUnit.DAYS.toSeconds(1)); 72 } 73 74 TestCachedTileLoaderJob(TileLoaderListener listener, Tile tile, String key, int minimumExpiry) throws IOException { 75 75 super(listener, tile, getCache(), new TileJobOptions(30000, 30000, null, minimumExpiry), 76 76 (ThreadPoolExecutor) Executors.newFixedThreadPool(1)); … … 104 104 return false; 105 105 } 106 return cacheData.getContent().length > 0; } 106 return cacheData.getContent().length > 0; 107 } 107 108 } 108 109 … … 112 113 private byte[] data; 113 114 114 115 115 @Override 116 116 public synchronized void tileLoadingFinished(Tile tile, boolean success) { … … 129 129 private final String url; 130 130 131 publicMockTileSource(String url) {131 MockTileSource(String url) { 132 132 super(new ImageryInfo("mock")); 133 133 this.url = url; … … 191 191 /** 192 192 * When tile server doesn't return any Expires/Cache-Control headers, expire should be at least MINIMUM_EXPIRES 193 * @throws IOException 193 * @throws IOException exception 194 194 */ 195 195 @Test … … 214 214 /** 215 215 * When tile server doesn't return any Expires/Cache-Control headers, expire should be at least minimumExpires parameter 216 * @throws IOException 216 * @throws IOException exception 217 217 */ 218 218 @Test … … 224 224 * When tile server doesn't return any Expires/Cache-Control headers, expire should be at least minimumExpires parameter, 225 225 * which is larger than MAXIMUM_EXPIRES 226 * @throws IOException 226 * @throws IOException exception 227 227 */ 228 228 … … 251 251 /** 252 252 * When tile server returns Expires header shorter than MINIMUM_EXPIRES, we should cache if for at least MINIMUM_EXPIRES 253 * @throws IOException 253 * @throws IOException exception 254 254 */ 255 255 @Test … … 288 288 job.getAttributes().getExpirationTime() <= duration); 289 289 } 290 291 290 292 291 @Test
Note:
See TracChangeset
for help on using the changeset viewer.
