brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [05/10] brooklyn-server git commit: fix test failures where error message slightly changed
Date Wed, 15 Feb 2017 11:55:59 GMT
fix test failures where error message slightly changed

and remove extra $brooklyn:$brooklyn, with test


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/db14c5e0
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/db14c5e0
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/db14c5e0

Branch: refs/heads/master
Commit: db14c5e059aae4b049c68d3276997bdc15133dda
Parents: 503ecba
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Tue Jan 17 17:57:01 2017 +0000
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Tue Jan 17 17:57:01 2017 +0000

----------------------------------------------------------------------
 .../brooklyn/camp/brooklyn/spi/dsl/DslDeferredFunctionCall.java | 2 +-
 .../org/apache/brooklyn/camp/brooklyn/spi/dsl/DslYamlTest.java  | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/db14c5e0/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/DslDeferredFunctionCall.java
----------------------------------------------------------------------
diff --git a/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/DslDeferredFunctionCall.java
b/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/DslDeferredFunctionCall.java
index 1d547ab..785e532 100644
--- a/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/DslDeferredFunctionCall.java
+++ b/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/DslDeferredFunctionCall.java
@@ -238,7 +238,7 @@ public class DslDeferredFunctionCall extends BrooklynDslDeferredSupplier<Object>
 
     @Override
     public String toString() {
-        return DslToStringHelpers.fn(object + "." + fnName, args);
+        return DslToStringHelpers.fn(DslToStringHelpers.internal(object) + "." + fnName,
args);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/db14c5e0/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/DslYamlTest.java
----------------------------------------------------------------------
diff --git a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/DslYamlTest.java
b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/DslYamlTest.java
index 2196df9..be4e9d5 100644
--- a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/DslYamlTest.java
+++ b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/DslYamlTest.java
@@ -516,7 +516,7 @@ public class DslYamlTest extends AbstractYamlTest {
                     "    dest: $brooklyn:self().invalidMethod()");
             Asserts.shouldHaveFailedPreviously("Non-existing non-deferred method should fail
deployment");
         } catch (CompoundRuntimeException e) {
-            Asserts.expectedFailureContains(e, "No such function 'invalidMethod()'");
+            Asserts.expectedFailureContains(e, "No such function 'invalidMethod'");
         }
     }
 
@@ -610,7 +610,8 @@ public class DslYamlTest extends AbstractYamlTest {
             assertEquals(getConfigEventually(app, DEST), app.getId());
             Asserts.shouldHaveFailedPreviously("Expected to fail because method does not
exist");
         } catch (Exception e) {
-            Asserts.expectedFailureContains(e, "No such function 'getNonExistent()'");
+            Asserts.expectedFailureContains(e, "No such function 'getNonExistent'");
+            Asserts.expectedFailureDoesNotContain(e, "$brooklyn:$brooklyn:");
         }
     }
 


Mime
View raw message