Kristian Rickert created OPENNLP-1843:
-----------------------------------------

             Summary: opennlp-eval-tests: surefire skip is never overridden, so 
eval tests silently never run
                 Key: OPENNLP-1843
                 URL: https://issues.apache.org/jira/browse/OPENNLP-1843
             Project: OpenNLP
          Issue Type: Bug
          Components: Build, Packaging and Test
    Affects Versions: 3.0.0-M3
            Reporter: Kristian Rickert
            Assignee: Kristian Rickert


The {{opennlp-eval-tests}} module disables surefire in its base build 
configuration:

{code:xml}
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
  <skip>true</skip>
</configuration>
{code}

The {{eval-tests}} and {{high-memory-tests}} profiles reconfigure surefire 
(includes, fork count, heap), but neither sets {{skip}} back to {{false}}. 
Maven merges the profile configuration into the base configuration, so 
{{skip=true}} survives and the module compiles its test sources but executes 
*zero* tests, even with {{-Peval-tests}}.

Observed consequences:
* Jenkins {{eval-tests-configurable}} build #48 reports SUCCESS, but the module 
section of the console log shows only compilation (~1.2s) and no {{*Eval}} 
class is executed anywhere in the log.
* Every eval class in the module is affected ({{SourceForgeModelEval}}, 
{{OntoNotes4*Eval}}, {{Conll*Eval}}, {{UniversalDependency20Eval}}, 
{{SentenceVectorsDLEval}}, {{DocumentCategorizerDLEval}}, {{NameFinderDLEval}}, 
{{SpellCheckerEval}}, ...).
* Eval regressions cannot be caught; e.g. the pinned-value changes from 
OPENNLP-1836 were never exercised by any eval run.

Reproduce locally:
{code}
mvn -pl opennlp-eval-tests -Peval-tests test 
-DOPENNLP_DATA_DIR=/path/to/opennlp-data
# finishes in ~1.5s, "Tests run: 0"
{code}

Fix: add {{<skip>false</skip>}} to the surefire configuration of both profiles. 
Verified locally that with this change the eval tests execute (and fail loudly 
when {{OPENNLP_DATA_DIR}} is unset, instead of being skipped silently).
{code:xml}
<configuration>
  <skip>false</skip>
  <argLine>-Xmx4g</argLine>
  ...
{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to