[MAGNOLIA-8640] One test in ExclusionsFilterTest relies on Windows specific environment to run Created: 18/Nov/22  Updated: 24/Oct/23

Status: Open
Project: Magnolia
Component/s: None
Affects Version/s: 6.3.0
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Federico Grilli Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Git Code Review
opened during git code review in MAGNOLIA-8639 Remove illegal reflexive access Closed
Relates
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Epic Link: Build on Java 17
Team: Nucleus

 Description   

A follow-up to MAGNOLIA-8639.

ExclusionsFilterTest#excludedDirectoryAreExcludedEveryWhereNotJustInRootWindowsSeparator was using some reflection magic to simulate a Windows-like file separator. However, this is no longer allowed in Java 17.
The test has been rewritten and uses a Junit5's annotation to run on Windows only.
Problem with this approach is that with our current CI setup it will basically be always ignored.

Here are some proposals:

  • Can we just remove the test, is it actually of value to us?
  • Can we rewrite it in a better way?
    • Looking at info.magnolia.resourceloader.file.ExclusionsFilter#test and org.apache.commons.io.FilenameUtils#normalize(..) , it seems that the test is borked anyway: File.separator is not used at all by that implementation
  • Could we set up a Jenkins build pipeline to run the test on Windows?
    • Is it worth for just one test though?

Generated at Mon Feb 12 04:34:29 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.