You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tony Reix (JIRA)" <ji...@codehaus.org> on 2015/02/16 11:57:19 UTC

[jira] (MNG-5765) Maven randomly badly manages rare weird cases (not-ending tests)

Tony Reix created MNG-5765:
------------------------------

             Summary: Maven randomly badly manages rare weird cases (not-ending tests)
                 Key: MNG-5765
                 URL: https://jira.codehaus.org/browse/MNG-5765
             Project: Maven
          Issue Type: Bug
    Affects Versions: 3.2.5
         Environment: RHEL 7.1 / x86_64
            Reporter: Tony Reix


In some rare cases, Maven does not capture the number of tests that have been run.

I'm now running FLUME unit tests, by means of:

mvn clean compile -Dhadoop.profile=2 -l mvn.Compile.res
mvn install -DskipTests -Dhadoop.profile=2 -l mvn.Install.res
for i in 4 5 6 7 8 9 10; do echo $i; mvn test -fn -Dhadoop.profile=2 -l mvn.Test.OPenJDK.res$i -X; done

I'm using OpenJDK 1.7 :
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/

I use a tool for summarizing the results, based on the output of Maven logged in file by means of "-l mvn.Test.OPenJDK.res$i" .

Here below, I look at test results of 7 runs of all FLUME tests, numbered from 4 to 10.

Look below, and notice that the "Total" number of tests run (first number column) for the Spillale test  is either 0 or 14.  14: 2 times out of 7 tries. 0: 5 times out of 7 tries.

# for i in 4 5 6 7 8 9 10; do ./BuildSummary.sh mvn.Test.OpenJDK.res$i | grep Spillable; done
> ModuleSpillable                                              Total Failure Error Skipped
Flume NG Spillable Memory channel 1.5.0.1     0     0     0     0
Flume NG Spillable Memory channel 1.5.0.1    14     0     0     0
Flume NG Spillable Memory channel 1.5.0.1     0     0     0     0
Flume NG Spillable Memory channel 1.5.0.1     0     0     0     0
Flume NG Spillable Memory channel 1.5.0.1     0     0     0     0
Flume NG Spillable Memory channel 1.5.0.1    14     0     0     0
Flume NG Spillable Memory channel 1.5.0.1     0     0     0     0


Looking at details (output of "mvn -X ...."), I see (for the last test run (#10), the one with "0" Tests run):
===========================================================
Forking command line: /bin/sh -c cd /home/tony/FLUME/IBMSOE-flume-FromGit-20150210-OpenJDK/flume-ng-channels/flume-spillable-memory-channel && /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/jre/bin/java -jar /home/tony/FLUME/IBMSOE-flume-FromGit-20150210-OpenJDK/flume-ng-channels/flume-spillable-memory-channel/target/surefire/surefirebooter135787559521625428.jar /home/tony/FLUME/IBMSOE-flume-FromGit-20150210-OpenJDK/flume-ng-channels/flume-spillable-memory-channel/target/surefire/surefire2229363911750034554tmp /home/tony/FLUME/IBMSOE-flume-FromGit-20150210-OpenJDK/flume-ng-channels/flume-spillable-memory-channel/target/surefire/surefire_1058902884120229740691tmp
Running org.apache.flume.channel.TestSpillableMemoryChannel

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
===========================================================
Notice that there are : "0" Tests run and that there is a missing line, just after the line starting with "Running..." .


Now, look at the same details for test run#9 (test run before the last one):
===========================================================
Forking command line: /bin/sh -c cd /home/tony/FLUME/IBMSOE-flume-FromGit-20150210-OpenJDK/flume-ng-channels/flume-spillable-memory-channel .................
Running org.apache.flume.channel.TestSpillableMemoryChannel
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 194.113 sec

Results :

Tests run: 14, Failures: 0, Errors: 0, Skipped: 0
===========================================================
Within this example, it is said that there are 14 "Tests run", not 0.
And there is a correct "Tests run: ..." line after the line starting with "Running ..."


Now, look at details (from output of Spillable test) for last run (#10) :
===========================================================
./flume-ng-channels/flume-spillable-memory-channel/target/surefire-reports/org.apache.flume.channel.TestSpillableMemoryChannel.txt :
-------------------------------------------------------------------------------
Test set: org.apache.flume.channel.TestSpillableMemoryChannel
-------------------------------------------------------------------------------
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 194.113 sec
===========================================================
You can see that, though Maven says that there are 0 Tests runs, there are 14.

And, if I look at the still-running Java processes AFTER all the FLUME tests have been run, I can see that there are several Java sub-processes (elementary tests launched by the main Maven "mvn" command) that are still there:
# ps -edf | grep java
root     14222     1  0 Feb12 ?        00:04:58 java -jar /home/tony/FLUME/IBMSOE-flume-FromGit-20150210-OpenJDK/flume-ng-channels/flume-spillable-memory-channel/target/surefire/surefirebooter6145763463198950899.jar /home/tony/FLUME/IBMSOE-flume-FromGit-20150210-OpenJDK/flume-ng-channels/flume-spillable-memory-channel/target/surefire/surefire3227929440141646135tmp /home/tony/FLUME/IBMSOE-flume-FromGit-20150210-OpenJDK/flume-ng-channels/flume-spillable-memory-channel/target/surefire/surefire_1055195751048502255360tmp
root     14296     1  0 Feb12 ?        00:05:32 java -jar /home/tony/FLUME/IBMSOE-flume-FromGit-20150210-OpenJDK/flume-ng-channels/flume-spillable-memory-channel/target/surefire/surefirebooter135787559521625428.jar /home/tony/FLUME/IBMSOE-flume-FromGit-20150210-OpenJDK/flume-ng-channels/flume-spillable-memory-channel/target/surefire/surefire2229363911750034554tmp /home/tony/FLUME/IBMSOE-flume-FromGit-20150210-OpenJDK/flume-ng-channels/flume-spillable-memory-channel/target/surefire/surefire_1058902884120229740691tmp


It is  not the first time I see this issue.
However, with FLUME, it seems easy to reproduce it.

I've done these tests with Maven version 3.2.1 .
I think that the issue appears with other versions since, on other machines, I've used older and fresher versions of Maven.

I'm now launching the same tests, in the same environment, with Maven 3.2.5 , in order to be 100% sure that the issue is still there with the last version.
If I cannot reproduce the issue with Maven 3.2.5, I'll close this JIRA.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)