Modify ↓

Opened 7 weeks ago

Last modified 4 days ago

#24924 new enhancement

[patch] Remove Junit 4 last remains

Reported by: gaben Owned by: team
Priority: normal Milestone: 26.12
Component: Unit tests Version:
Keywords: junit4 Cc:

Description

While working on some patches, I noticed that IntelliJ still has ancient Junit4 files on the classpath. I therefore started removing them completely from the core.

I only focused on the core, the core plugins still have to be checked.

FYI: There is an existing ticket for Junit 6 migration (#24921).

Attachments (1)

24924.patch​ (82.9 KB ) - added by gaben 3 weeks ago.

Download all attachments as: .zip

Change History (7)

comment:1 by gaben, 3 weeks ago

Also #23090 should be fixed with the changes.

by gaben, 3 weeks ago

Attachment: 24924.patch​ added

comment:2 by gaben, 3 weeks ago

Milestone: → 26.11
Summary: Remove Junit 4 last remains → [patch] Remove Junit 4 last remains

Beware, the patch introduces deprecations, but it should ultimately be leaner and cleaner for everyone in the long term.

Some adjustments will probably be needed.

Changes:

  • removed all references to JUnit 4 (dropped junit-vintage-engine, junit-jupiter-migrationsupport), JOSMTestRules now runs on plain Jupiter callbacks
  • build cleanup:
    • removed the unused commonslang/errorprone_javac ivy confs and the javacc.home property,
    • fixed the jdeps "all" graph and standalone ant extract-libraries, and
    • synced commons-lang3 between Ant and Maven.
  • josm-custom.jar no longer bundles commons-lang3 and Jetbrains annotations; the sources jar now ships jakarta.annotation-api 3.0.0 sources, matching the classes.
  • tests no longer write foobar/ or failed.png into the working copy (#23090)
  • PluginHandlerJOSMTooOldTest no longer fails on my machine with hu_HU locale. The expected strings were built before the test switched the locale to English, so they had the wrong thousands separator.
Last edited 3 weeks ago by gaben (previous) (diff)

comment:3 by gaben, 12 days ago

If there are no comments regarding the patch, I'll apply the fixes in the next few days (at the start of the next release cycle).

This will be alongside other build-related fixes that I have been moving back and forth on my machine for a while.

comment:4 by stoecker, 10 days ago

Milestone: 26.11 → 26.12

Milestone renamed

comment:5 by gaben, 5 days ago

In 36522/osm:

see #24924 - use the JUnit 5+ assertThrows in photo_geotagging and remove org.junit.vintage dependency

comment:6 by gaben, 4 days ago

Please merge: ​https://github.com/JOSM/markseen/pull/8

Removing JUnit 4 from the core would break the markseen plugin's tests. Fortunately, this does not seem to affect the tests of other plugins, including those hosted on GH. This is either because they declare their own dependencies, or because they do not use functions that are soon to be removed.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to gaben.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.