You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Eric Badger (JIRA)" <ji...@apache.org> on 2016/08/09 21:50:20 UTC

[jira] [Commented] (YARN-4974) Random test failure:TestRMApplicationHistoryWriter#testRMWritingMassiveHistoryForCapacitySche

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

Eric Badger commented on YARN-4974:
-----------------------------------

I think that the problem here is that this test assumes that there will be fairly consistent CPU load on the machine running the test for the duration of the test. In practice, this can be very far from true. Especially since this test takes around 60s to complete, the load could be massively different in each half of the test.

I can easily and consistently make this test fail by varying the load on my cpu during the test. For example, I started the test, and after 30 seconds, I ran a stress script which stresses the CPU on my machine. The test finished with (elapsedTime1, elapsedTime2) = (37233, 52861), which very clearly does not fall within the 10% threshold and caused the test to fail.

Asking [~zjshen] (creator of initial test) and [~vinodkv] (committer of initial test): Is this test appropriate as a unit test? It relies on the assumption that performance will be consistent over the duration of the run, which is not something that I believe we can assume. To me, this is a performance test, not a unit test. 

> Random test failure:TestRMApplicationHistoryWriter#testRMWritingMassiveHistoryForCapacitySche
> ---------------------------------------------------------------------------------------------
>
>                 Key: YARN-4974
>                 URL: https://issues.apache.org/jira/browse/YARN-4974
>             Project: Hadoop YARN
>          Issue Type: Test
>          Components: test, yarn
>            Reporter: Bibin A Chundatt
>
> https://builds.apache.org/job/PreCommit-YARN-Build/11128/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.8.0_77.txt
> {noformat}
> Tests run: 7, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 196.959 sec <<< FAILURE! - in org.apache.hadoop.yarn.server.resourcemanager.ahs.TestRMApplicationHistoryWriter
> testRMWritingMassiveHistoryForCapacitySche(org.apache.hadoop.yarn.server.resourcemanager.ahs.TestRMApplicationHistoryWriter)  Time elapsed: 125.174 sec  <<< FAILURE!
> java.lang.AssertionError: null
> 	at org.junit.Assert.fail(Assert.java:86)
> 	at org.junit.Assert.assertTrue(Assert.java:41)
> 	at org.junit.Assert.assertTrue(Assert.java:52)
> 	at org.apache.hadoop.yarn.server.resourcemanager.ahs.TestRMApplicationHistoryWriter.testRMWritingMassiveHistory(TestRMApplicationHistoryWriter.java:441)
> 	at org.apache.hadoop.yarn.server.resourcemanager.ahs.TestRMApplicationHistoryWriter.testRMWritingMassiveHistoryForCapacitySche(TestRMApplicationHistoryWriter.java:383)
> {noformat}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org