Changeset 36228 in osm for applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/cubemap/TileDownloadingTaskTest.java
- Timestamp:
- 2024-03-14T16:34:12+01:00 (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/cubemap/TileDownloadingTaskTest.java
r36194 r36228 7 7 import java.util.List; 8 8 import java.util.concurrent.Callable; 9 import java.util.concurrent.ExecutionException; 9 10 import java.util.concurrent.ExecutorService; 10 11 import java.util.concurrent.Executors; … … 13 14 import org.junit.jupiter.api.Disabled; 14 15 import org.junit.jupiter.api.Test; 16 import org.openstreetmap.josm.plugins.streetside.CubeMapTileXY; 17 import org.openstreetmap.josm.plugins.streetside.utils.TestUtil; 15 18 16 19 @Disabled … … 18 21 19 22 @Test 20 final void testCall() throws InterruptedException { 21 ExecutorService pool = Executors.newFixedThreadPool(1); 22 List<Callable<List<String>>> tasks = new ArrayList<>(1); 23 tasks.add(new TileDownloadingTask("2202112030033001233")); 24 List<Future<List<String>>> results = pool.invokeAll(tasks); 25 assertEquals(results.get(0), "2202112030033001233"); 23 final void testCall() throws InterruptedException, ExecutionException { 24 try (ExecutorService pool = Executors.newFixedThreadPool(1)) { 25 List<Callable<List<String>>> tasks = new ArrayList<>(1); 26 tasks.add(new TileDownloadingTask(TestUtil.generateImage("2202112030033001233", 0, 0), 27 CubemapUtils.CubemapFaces.FRONT, new CubeMapTileXY(CubemapUtils.CubemapFaces.FRONT, 0, 0))); 28 List<Future<List<String>>> results = pool.invokeAll(tasks); 29 assertEquals("2202112030033001233", results.get(0).get().get(0)); 30 } 26 31 } 27 32 }
Note:
See TracChangeset
for help on using the changeset viewer.