[
https://issues.apache.org/jira/browse/AMBARI-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13559271#comment-13559271
]
Hitesh Shah commented on AMBARI-1238:
-------------------------------------
Comments:
- use specific imports instead of * in import org.apache.commons.io.*;
- remove unused import of com.apple.eawt.AppEvent
There should be no need to delete the tmp dir when using temp folder.
{quote}
+ // Cleanup created files
+ FileUtils.deleteDirectory(stackRootTmp);
{quote}
No need to catch exceptions to log error - unit test failure will capture the
information.
{quote}
+ } catch (IOException ioException) {
+ LOG.info("Error creating files ", ioException);
+ throw ioException;
+ }
+ try {
+ ambariMetaInfo.init();
+ } catch(Exception ex) {
+ LOG.info("Error in initializing ", ex);
+ }
{quote}
Please add an assertNull check to verify that there is no stack called .svn.
Are there other checks needed for the service folders, configs, etc which are
being filtered out? Do other hidden files need to be skipped when looking at
files that are parsed? For example, vi sometimes leaves around swp files, etc.
> AmbariMetaInfoTest getServices() acceptance test failure.
> ---------------------------------------------------------
>
> Key: AMBARI-1238
> URL: https://issues.apache.org/jira/browse/AMBARI-1238
> Project: Ambari
> Issue Type: Bug
> Components: test
> Affects Versions: 1.2.1
> Reporter: Siddharth Wagle
> Assignee: Siddharth Wagle
> Fix For: 1.2.1
>
> Attachments: AMBARI-1238.patch
>
>
> Current external repo unit tests fail with the following ...
> {code}
> Results :
> Failed tests:
> testStacks(org.apache.ambari.server.api.services.AmbariMetaServiceTest):
> expected:<[HDP]> but was:<[.svn]>
> Tests in error:
> getServices(org.apache.ambari.server.api.services.AmbariMetaInfoTest)
> Tests run: 533, Failures: 1, Errors: 1, Skipped: 1
> {code}
> ... we are not skipping .svn directories.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira