Fix broken test (data was imported) and change a logging.error to logging.debug

Signed-off-by: Taylor Smock <smocktaylor@gmail.com>
pull/1/head
Taylor Smock 2019-09-20 14:12:40 -06:00
rodzic f18cceebd8
commit c2fafd48bb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 9FDE4FFEF1C4CCB7
2 zmienionych plików z 3 dodań i 4 usunięć

Wyświetl plik

@ -35,13 +35,12 @@ public final class RapiDDataUtils {
@SuppressWarnings("PMD.DataflowAnomalyAnalysis")
public static DataSet getData(BBox bbox) {
Logging.setLogLevel(Logging.LEVEL_DEBUG);
InputStream inputStream = null;
DataSet dataSet = new DataSet();
for (String urlString : API_LIST) {
try {
final URL url = new URL(urlString.replace("{bbox}", bbox.toStringCSV(",")));
Logging.error("{0}: Getting {1}", RapiDPlugin.NAME, url.toString());
Logging.debug("{0}: Getting {1}", RapiDPlugin.NAME, url.toString());
inputStream = url.openStream();
dataSet.mergeFrom(OsmReader.parseDataSet(inputStream, null));

Wyświetl plik

@ -19,8 +19,8 @@ public class RapiDDataUtilsTest {
@Test
public void testGetData() {
BBox testBBox = new BBox();
testBBox.add(new LatLon(39.066058, -108.5683808));
testBBox.add(new LatLon(39.0667526, -108.5681757));
testBBox.add(new LatLon(39.0666521, -108.5707187));
testBBox.add(new LatLon(39.0664016, -108.5702225));
DataSet ds = new DataSet(RapiDDataUtils.getData(testBBox));
Assert.assertEquals(1, ds.getWays().size());
}