brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <>
Subject [GitHub] brooklyn-server pull request #411: Test change to coercion of default config...
Date Mon, 07 Nov 2016 11:57:05 GMT
Github user aledsage commented on a diff in the pull request:
    --- Diff: camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/
    @@ -112,7 +113,14 @@ protected void waitForApplicationTasks(Entity app) {
         protected String loadYaml(String yamlFileName, String ...extraLines) throws Exception
    -        String input = new ResourceUtils(this).getResourceAsString(yamlFileName).trim();
    +        ResourceUtils ru = new ResourceUtils(this);
    +        if (!ru.doesUrlExist(yamlFileName)) {
    +            if (ru.doesUrlExist(Urls.mergePaths(getClass().getPackage().getName().replace('.',
'/'), yamlFileName))) {
    +                // look in package-specific folder if not found at root
    +                yamlFileName = Urls.mergePaths(getClass().getPackage().getName().replace('.',
'/'), yamlFileName);
    --- End diff --
    Very minor (feel free to ignore). If it still can't be found, I'd prefer the final exception
to give the original `yamlFileName` rather than the package-specific name. With this change,
it will throw the exception in `run.getResourceAsString` with the transformed value.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message