Modify ↓
#16637 closed defect (fixed)
Rework unit tests to not depend on external website
| Reported by: | Don-vip | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | 20.11 |
| Component: | Unit tests | Version: | |
| Keywords: | Cc: | ris |
Description (last modified by )
We still have some unit tests making real network connections, failing when the website is slow or unreachable:
- ✔ org.openstreetmap.josm.gui.oauth.OsmOAuthAuthorizationClientTest.testCookieHandlingMock
- org.openstreetmap.josm.gui.oauth.OsmOAuthAuthorizationClientTest.testCookieHandlingCookieManager
- ✔ org.openstreetmap.josm.gui.preferences.server.ApiUrlTestTaskTest.testNominalUrl
- ✔ org.openstreetmap.josm.gui.preferences.server.ApiUrlTestTaskTest.testAlertInvalidServerResult
- ✔ org.openstreetmap.josm.io.OsmServerHistoryReaderTest.testWay
- ✔ org.openstreetmap.josm.io.OsmServerHistoryReaderTest.testNode
- ✔ org.openstreetmap.josm.tools.HttpClientTest.testOpenUrlBzip
- ✔ org.openstreetmap.josm.tools.HttpClientTest.testOpenUrlGzip
- ✔ org.openstreetmap.josm.tools.HttpClientTest.testTicket9660
Attachments (0)
Change History (19)
comment:1 by , 7 years ago
comment:7 by , 5 years ago
| Milestone: | → 20.10 |
|---|
comment:12 by , 5 years ago
| Description: | modified (diff) |
|---|
comment:14 by , 5 years ago
| Description: | modified (diff) |
|---|
comment:15 by , 5 years ago
Replying to simon04:
In 17197/josm:
This broke some other test.
Are failing tests a reason for not building the ubuntu package?
comment:17 by , 5 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:19 by , 5 years ago
Two tests still use the API directly, which is currently down:
org.openstreetmap.josm.actions.downloadtasks.DownloadNotesTaskTest.testDownloadExternalFile org.openstreetmap.josm.data.oauth.SignpostAdaptersTest.testHttpResponseGetReasonPhrase
They failed with "connect time out" error.
Version 0, edited 5 years ago by (next)
Note:
See TracTickets
for help on using tickets.



There also those that unintentionally make network requests, e.g. fetching the "start page" from the wiki.