Opened 4 years ago
Closed 4 years ago
#21150 closed enhancement (fixed)
[PATCH] Add JUnit5 annotation for WireMockServer
Reported by: | taylor.smock | Owned by: | Don-vip |
---|---|---|---|
Priority: | normal | Milestone: | 21.07 |
Component: | Unit tests | Version: | |
Keywords: | junit5 | Cc: |
Description (last modified by )
Add a @BasicWiremock annotation for use by tests
PR available at https://github.com/openstreetmap/josm/pull/73 or https://gitlab.com/smocktaylor/josm/-/merge_requests/9 .
Attachments (1)
Change History (10)
comment:1 by , 4 years ago
Owner: | changed from | to
---|---|
Status: | assigned → new |
comment:2 by , 4 years ago
Description: | modified (diff) |
---|---|
Summary: | [WIP PATCH] Add JUnit5 annotation for WireMockServer → [PATCH] Add JUnit5 annotation for WireMockServer |
follow-up: 5 comment:4 by , 4 years ago
OK. Everything is passing in the workflow for https://github.com/openstreetmap/josm/pull/73 except for the following actions:
- PMD (failing due to "HttpError: Resource not accessible by integration")
- Checkstyle (see above)
- Java 8 on Windows test (failing on master, exact same test (
org.openstreetmap.josm.data.projection.ProjectionRegressionTest
), see https://github.com/openstreetmap/josm/runs/3127318161 -- I wonder if something changed in the Windows runners in the past two days?)
by , 4 years ago
Attachment: | 21150.patch added |
---|
follow-up: 6 comment:5 by , 4 years ago
Replying to taylor.smock:
- PMD (failing due to "HttpError: Resource not accessible by integration")
- Checkstyle (see above)
Seems to be caused by GitHub security that prevents people without write access to the repo do do many things. Not sure how to fix it, I will disable these tasks for PR until we move the repo to JOSM org and investigate further.
- Java 8 on Windows test (failing on master, exact same test (
org.openstreetmap.josm.data.projection.ProjectionRegressionTest
), see https://github.com/openstreetmap/josm/runs/3127318161 -- I wonder if something changed in the Windows runners in the past two days?)
This test is very sensible to the Math functions implementation, especially Math.cos (which is a native lib in the JRE), so
yes, even a Windows update could have an impact. There was a huge change of Math implementation in Java 9 (switch of library) so that would explain why only Java 8 fails. I'll see how to disable this test in this particular environment, as it works fine with recent versions of Java.
follow-up: 7 comment:6 by , 4 years ago
Replying to Don-vip:
Seems to be caused by GitHub security that prevents people without write access to the repo do do many things. Not sure how to fix it, I will disable these tasks for PR until we move the repo to JOSM org and investigate further.
I kind of figured that the PMD/checkstyle tasks could be ignored, as long as they actually passed locally (AFAIK, there should be no differences from environment on those two, so if it passes locally, all is good). I've got a .gitlab-ci
pipeline we could split apart just to be able to run PMD
/checkstyle
on forks, if needed (see https://gitlab.com/smocktaylor/josm/-/merge_requests/1, but ignore the test-java
job -- its running over an hour, which causes GitLab to kill it).
This test is very sensible to the Math functions implementation, especially Math.cos (which is a native lib in the JRE), so
yes, even a Windows update could have an impact. There was a huge change of Math implementation in Java 9 (switch of library) so that would explain why only Java 8 fails. I'll see how to disable this test in this particular environment, as it works fine with recent versions of Java.
I kind of figured, once I went and did some investigation (it doesn't make sense for a very simple change (fd2d90316d45548b8695496a23c187e7cbf5ed22) would cause CI to fail, especially when it shouldn't affect any of the code for the failing test).
comment:7 by , 4 years ago
Replying to taylor.smock:
I kind of figured, once I went and did some investigation (it doesn't make sense for a very simple change (fd2d90316d45548b8695496a23c187e7cbf5ed22) would cause CI to fail, especially when it shouldn't affect any of the code for the failing test).
I think the test environment changed around the same time of this commit, but the issue is likely unrelated.
comment:8 by , 4 years ago
Milestone: | → 21.07 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Most of the test classes depending upon WireMockRules have been migrated to JUnit 5.
Anything depending upon the following was not migrated:
EDIT:
Remaining JUnit 4 tests (
git grep org.junit.Test
):