[ https://issues.apache.org/jira/browse/YARN-8759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16623329#comment-16623329 ]
Antal Bálint Steinbach edited comment on YARN-8759 at 9/21/18 9:31 AM: ----------------------------------------------------------------------- Hi [~maniraj...@gmail.com] , Unfortunately no or at least I would not change, they are slightly different. TestRMAdminCLI does a setup with @Before annotation before every test method call and initializes the resource file. This setup is required for every test in the test class. TestClientRMService uses the resource file only in on test, so it is not required to do an initialization before every other test method run. TestResourceUtils uses the resource file in every test, but it uses different files in different methods, so the test methods do the initialization of the resource file. The common thing is that we need to do a teardown (delete the created file) after every test method call that is why we should have a resource file as a field. Setting it to null does make sense only in TestClientRMService because there only one test method uses it. If you think it is confusing I can simply remove that line. It is not important to have it there. (new patch uploaded) was (Author: bsteinbach): Hi [~maniraj...@gmail.com] , Unfortunately no or at least I would not change, they are slightly different. TestRMAdminCLI does a setup with @Before annotation before every test method call and initializes the resource file. This setup is required for every test in the test class. TestClientRMService uses the resource file only in on test, so it is not required to do an initialization before every other test method run. TestResourceUtils uses the resource file in every test, but it uses different files in different methods, so the test methods do the initialization of the resource file. The common thing is that we need to do a teardown (delete the created file) after every test method call that is why we should have a resource file as a field. Setting it to null does make sense only in TestClientRMService because there only one test method uses it. If you think it is confusing I can simply remove that line. It is not important to have it there. > Copy of "resource-types.xml" is not deleted if test fails, causes other test > failures > ------------------------------------------------------------------------------------- > > Key: YARN-8759 > URL: https://issues.apache.org/jira/browse/YARN-8759 > Project: Hadoop YARN > Issue Type: Bug > Components: yarn > Reporter: Antal Bálint Steinbach > Assignee: Antal Bálint Steinbach > Priority: Major > Attachments: YARN-8759.001.patch, YARN-8759.002.patch, > YARN-8759.003.patch, YARN-8759.004.patch > > > resource-types.xml is copied in several tests to the test machine, but it is > deleted only at the end of the test. In case the test fails the file will not > be deleted and other tests will fail, because of the wrong configuration. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org