[
https://issues.apache.org/jira/browse/RAT-595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18148411#comment-18148411
]
ASF subversion and git services commented on RAT-595:
-----------------------------------------------------
Commit a71bd400020e798dcbed38bd94e37e610ae5750b in creadur-rat's branch
refs/heads/master from P. Ottlinger
[ https://gitbox.apache.org/repos/asf?p=creadur-rat.git;h=a71bd4000 ]
Merge pull request #792 from apache/fix/RAT-595
RAT-595: Fix test order problem and use the same configuration/context
> Isolation problem in ReporterTest - NPE on GHA
> ----------------------------------------------
>
> Key: RAT-595
> URL: https://issues.apache.org/jira/browse/RAT-595
> Project: Apache RAT
> Issue Type: Bug
> Affects Versions: 0.18
> Reporter: Philipp Ottlinger
> Assignee: Philipp Ottlinger
> Priority: Major
> Fix For: 0.19
>
>
> h2. Problem
> A NPE is thrown in ReporterTest.java (line 201/202) as 2 ways to configure
> are mixed:
> * collect.parseCommands(...) creates the configuration with its own
> BaseOptionCollection
> * afterwards the test calls OptionCollection.createConfiguration(context),
> which uses a state BASE_OPTION_COLLECTION
> OptionCollection.java (line 198-201) selects Arg.DIR albeit the test does not
> set a --dir and null is returned instead.
> A simple call of the test succeeds as it only happens while running the whole
> test suite.
> h2. Solution
> * Test should use its configuration via context.getConfiguration(); instead
> of OptionCollection.createConfiguration(context).
> * Add a regression test that ensures setting a --dir does not interfere with
> a test without directory set afterwards.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)