You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Hans Deragon (JIRA)" <ji...@apache.org> on 2016/01/21 16:47:39 UTC

[jira] [Created] (OOZIE-2443) TestValidation.testValid() works unreliably.

Hans Deragon created OOZIE-2443:
-----------------------------------

             Summary: TestValidation.testValid() works unreliably.
                 Key: OOZIE-2443
                 URL: https://issues.apache.org/jira/browse/OOZIE-2443
             Project: Oozie
          Issue Type: Bug
    Affects Versions: 4.2.0
         Environment: Windows 10 + Cygwin or IntelliJ Idea.
            Reporter: Hans Deragon
            Priority: Minor


org.apache.oozie.cli.TestValidation.testValid() works unreliably.  When executing the following, from either Cygwin or IntelliJ Idea, the test fails.

{noformat}
[ oozie\client ]  mvn clean test
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.oozie:oozie-client:jar:4.3.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for com.atlassian.maven.plugins:maven-clover2-plugin is missing. @ org.apache.oozie:oozie-main:4.3.0-SNAPSHOT, C:\cygwin64\home\HDerago1\ypg\3r21
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:findbugs-maven-plugin is missing. @ org.apache.oozie:oozie-main:4.3.0-SNAPSHOT, C:\cygwin64\home\HDerago1\ypg\3rdparty\oo
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Apache Oozie Client 4.3.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ oozie-client ---
[INFO] Deleting C:\cygwin64\home\HDerago1\ypg\3rdparty\oozie\client\target
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ oozie-client ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ oozie-client ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 37 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ oozie-client ---
[INFO] Compiling 36 source files to C:\cygwin64\home\HDerago1\ypg\3rdparty\oozie\client\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ oozie-client ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ oozie-client ---
[INFO] Compiling 5 source files to C:\cygwin64\home\HDerago1\ypg\3rdparty\oozie\client\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.2:test (default-test) @ oozie-client ---
[INFO] Surefire report directory: C:\cygwin64\home\HDerago1\ypg\3rdparty\oozie\client\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Concurrency config is parallel='classes', perCoreThreadCount=true, threadCount=1, useUnlimitedThreads=false
Running org.apache.oozie.cli.TestCLIParser
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.044 sec
Running org.apache.oozie.cli.TestValidation
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.238 sec <<< FAILURE!
Running org.apache.oozie.cli.TestOozieCLIMethods
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.647 sec
Running org.apache.oozie.client.rest.TestJsonToBean
Tests run: 18, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.145 sec
Running org.apache.oozie.client.rest.TestJsonUtils
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.039 sec

Results :

Failed tests:   testValid(org.apache.oozie.cli.TestValidation)

Tests run: 40, Failures: 1, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.644 s
[INFO] Finished at: 2016-01-21T10:25:43-05:00
[INFO] Final Memory: 26M/448M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.2:test (default-test) on project oozie-client: There are test failures.
[ERROR]
[ERROR] Please refer to C:\cygwin64\home\HDerago1\ypg\3rdparty\oozie\client\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
{noformat}

However, when called directly from the IDE or with the following command, it always passes.

{noformat}
mvn clean -Dtest=org.apache.oozie.cli.TestValidation test
{noformat}

I added a few traces and found out that when it failed, no Exception was thrown but captureOutput(args) returns an empty ("") string instead of the expected "Valid workflow-app".  I have no clue why this is happening.  At first, the testing code looks good, with the System.out.flush() within captureOutput() should do the job.  Maybe someone else could solve this mystery.  The problem lies maybe within OozieCLI.validateCommandV41().



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)