diff --git a/test/resources/wiremock/mappings/maps_ml_roads-04b70b03-d148-4e3d-a1fc-98334cd10e64.json b/test/resources/wiremock/mappings/maps_ml_roads-04b70b03-d148-4e3d-a1fc-98334cd10e64.json new file mode 100644 index 0000000..9d5360d --- /dev/null +++ b/test/resources/wiremock/mappings/maps_ml_roads-04b70b03-d148-4e3d-a1fc-98334cd10e64.json @@ -0,0 +1,28 @@ +{ + "id" : "04b70b03-d148-4e3d-a1fc-98334cd10e64", + "name" : "maps_ml_roads", + "request" : { + "url" : "/maps/ml_roads?conflate_with_osm=true&theme=ml_road_vector&collaborator=josm&token=ASb3N5o9HbX8QWn8G_NtHIRQaYv3nuG2r7_f3vnGld3KhZNCxg57IsaQyssIaEw5rfRNsPpMwg4TsnrSJtIJms5m&hash=ASawRla3rBcwEjY4HIY&bbox=-108.4495519,39.095376,-108.4422314,39.0987811&result_type=road_building_vector_xml", + "method" : "GET" + }, + "response" : { + "status" : 200, + "body" : "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n", + "headers" : { + "Content-Type" : "text/xml; charset=UTF-8", + "Strict-Transport-Security" : "max-age=15552000; preload", + "Vary" : "Accept-Encoding", + "X-Content-Type-Options" : "nosniff", + "X-Frame-Options" : "DENY", + "X-XSS-Protection" : "0", + "Access-Control-Allow-Origin" : "https://facebook.com", + "X-FB-Debug" : "7g3PXnF8/LGeSAoO/IVLk6j+58f9Nc65opZ9zOB6X5EcETKOxoNZNHWvVnAX+NOSLrAEniyckQSQEjy++0JEPA==", + "Date" : "Thu, 12 Dec 2019 19:52:23 GMT", + "Alt-Svc" : "h3-24=\":443\"; ma=3600", + "Connection" : "keep-alive" + } + }, + "uuid" : "04b70b03-d148-4e3d-a1fc-98334cd10e64", + "persistent" : true, + "insertionIndex" : 16 +} \ No newline at end of file diff --git a/test/unit/org/openstreetmap/josm/plugins/mapwithai/frontend/MapWithAIDownloadReaderTest.java b/test/unit/org/openstreetmap/josm/plugins/mapwithai/frontend/MapWithAIDownloadReaderTest.java index 5803e92..bc135bb 100644 --- a/test/unit/org/openstreetmap/josm/plugins/mapwithai/frontend/MapWithAIDownloadReaderTest.java +++ b/test/unit/org/openstreetmap/josm/plugins/mapwithai/frontend/MapWithAIDownloadReaderTest.java @@ -67,8 +67,11 @@ public class MapWithAIDownloadReaderTest { @Test public void testDoDownload() { MapWithAIDownloadReader reader = new MapWithAIDownloadReader(); - DownloadSettings settings = new DownloadSettings( - new Bounds(39.0239848, -108.4522247, 39.1066201, -108.3368683), false, false); + // TODO revert commit that adds these lines as soon as MapWithAI fixes timeout + // issue see + // https://facebook.com/maps/ml_roads?conflate_with_osm=true&theme=ml_road_vector&collaborator=josm&token=ASb3N5o9HbX8QWn8G_NtHIRQaYv3nuG2r7_f3vnGld3KhZNCxg57IsaQyssIaEw5rfRNsPpMwg4TsnrSJtIJms5m&hash=ASawRla3rBcwEjY4HIY&bbox=-108.4522247,39.0239848,-108.3368683,39.1066201&result_type=road_building_vector_xml + DownloadSettings settings = new DownloadSettings(new Bounds(39.095376, -108.4495519, 39.0987811, -108.4422314), + false, false); MapWithAIDownloadReader.MapWithAIDownloadData data = new MapWithAIDownloadReader.MapWithAIDownloadData( MapWithAIPreferenceHelper.getMapWithAIUrl(), errors -> { });