[MAGNOLIA-5517] unit-tests should work with default intellj import Created: 26/Nov/13  Updated: 27/Nov/13  Resolved: 26/Nov/13

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Christoph Meier Assignee: Jan Haderka
Resolution: Not an issue Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File failing_tests_SC_from_DLipp.jpg     PNG File test_workingaround_fromJarda.png    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

On branch 4.5.x (maybe on master, too, must be checked) lots of test are failing when runned with intelliJ.
This happens when the sub-projects of main are imported alltogether with the paren-pom of the main project (which is the usual case).
For an overview of the not working tests see screenshot.

There is a "workaround" to set the working directory for the test explicitely. (see screenshot). Or. alternatively, the sub-project which contains the test can be imported "stand-alone".
But ususally developers rely on that a test just cen be run after having checked it out from git without any speclai settings.

So. All the unit test must work with "usual" project-imports without any IDE-settings for the test.



 Comments   
Comment by Jaroslav Simak [ 26/Nov/13 ]

In Run->Edit configuration->Defaults->JUnit->Working directory set the value $MODULE_DIR$ and Intellij will set the relative path in all junits just like Maven.
– stackoverflow.com/questions/5637765/how-to-deal-with-relative-path-in-junits-between-maven-and-intellij

I'd say this issue can be closed as "Not an issue"

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