Changeset 14527 in josm


Ignore:
Timestamp:
2018-12-08T23:04:08+01:00 (4 months ago)
Author:
Don-vip
Message:

see #16073 - fix timeouts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTestIT.java

    r14526 r14527  
    1313import java.util.Set;
    1414import java.util.TreeMap;
     15import java.util.concurrent.TimeUnit;
    1516
    1617import org.junit.Rule;
     
    7071        if (url != null && !url.isEmpty() && !workingURLs.contains(url)) {
    7172            try {
    72                 Response response = HttpClient.create(new URL(url)).setConnectTimeout(30).setReadTimeout(60).connect();
     73                Response response = HttpClient.create(new URL(url))
     74                        .setConnectTimeout((int) TimeUnit.SECONDS.toMillis(30))
     75                        .setReadTimeout((int) TimeUnit.SECONDS.toMillis(60))
     76                        .connect();
    7377                if (response.getResponseCode() >= 400) {
    7478                    addError(info, url + " -> HTTP " + response.getResponseCode());
Note: See TracChangeset for help on using the changeset viewer.