flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-8070) YarnTestBase should print prohibited string
Date Tue, 14 Nov 2017 14:07:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-8070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16251415#comment-16251415
] 

ASF GitHub Bot commented on FLINK-8070:
---------------------------------------

GitHub user zentol opened a pull request:

    https://github.com/apache/flink/pull/5012

    [FLINK-8070][yarn][tests] Print errors found in log files

    ## What is the purpose of the change
    
    This PR modifies the `YarnTestBase` to print found exceptions in the test failure message.
    
    The output now looks like this:
    
    ```
    java.lang.AssertionError(Found a file /home/Zento/flink/flink-yarn-tests/target/flink-yarn-tests-fifo/flink-yarn-tests-fifo-logDir-nm-0_0/application_1510667711263_0001/container_1510667711263_0001_01_000001/jobmanager.log
with a prohibited string (one of [Exception, Started SelectChannelConnector@0.0.0.0:8081]).
Excerpts:
    [
    java.lang.Exception: Could not create actor system
            at org.apache.flink.runtime.clusterframework.BootstrapTools.startActorSystem(BootstrapTools.java:171)
            at org.apache.flink.runtime.clusterframework.BootstrapTools.startActorSystem(BootstrapTools.java:115)
            at org.apache.flink.yarn.YarnApplicationMasterRunner.runApplicationMaster(YarnApplicationMasterRunner.java:313)
            at org.apache.flink.yarn.YarnApplicationMasterRunner$1.call(YarnApplicationMasterRunner.java:199)
            at org.apache.flink.yarn.YarnApplicationMasterRunner$1.call(YarnApplicationMasterRunner.java:196)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.Subject.doAs(Subject.java:422)
            at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1556)
            at org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41)
            at org.apache.flink.yarn.YarnApplicationMasterRunner.run(YarnApplicationMasterRunner.java:196)
            at org.apache.flink.yarn.YarnApplicationMasterRunner.main(YarnApplicationMasterRunner.java:123)
    Caused by: java.lang.VerifyError: Inconsistent stackmap frames at branch target 152
    ])
            at org.junit.runners.model.MultipleFailureException.assertEmpty(MultipleFailureException.java:67)
            at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:39)
            at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
            at org.junit.rules.RunRules.evaluate(RunRules.java:20)
            at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
            at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
            at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
            at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
            at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
            at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
            at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
            at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
            at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
            at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
            at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
            at org.junit.rules.RunRules.evaluate(RunRules.java:20)
            at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
            at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
            at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
            at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
            at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
            at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
            at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
            at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
    ```
    
    ## Verifying this change
    
    Create some failure condition in the yarn tests and check the test output. (I _luckily_
got one on hand locally due to FLINK-8071)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zentol/flink 8070

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/5012.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #5012
    
----
commit f563873f1a413c5410c565df318f01510c1a0620
Author: zentol <chesnay@apache.org>
Date:   2017-11-14T10:55:33Z

    [FLINK-8070][yarn][tests] Print errors found in log files

----


> YarnTestBase should print prohibited string
> -------------------------------------------
>
>                 Key: FLINK-8070
>                 URL: https://issues.apache.org/jira/browse/FLINK-8070
>             Project: Flink
>          Issue Type: Improvement
>          Components: Tests, YARN
>    Affects Versions: 1.4.0
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>            Priority: Critical
>             Fix For: 1.4.0
>
>
> The yarn tests check the log files for a set of prohibited strings. If found, the entire
log file is logged as WARN, the offending line is logged as ERROR, and the test fails with
this unhelpful message:
> {code}
> java.lang.AssertionError(Found a file /home/travis/build/apache/flink/flink-yarn-tests/target/flink-yarn-tests-fifo/flink-yarn-tests-fifo-logDir-nm-1_0/application_1510164935122_0002/container_1510164935122_0002_01_000001/jobmanager.log
with a prohibited string: [Exception, Started SelectChannelConnector@0.0.0.0:8081])
> {code}
> If you don't have log access on travis you have thus no knowledge what actually went
wrong.
> I propose to also print smaller excerpts around the found error (like 10 lines or smth)
in the Assert.fail message.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message