Repository: incubator-brooklyn Updated Branches: refs/heads/master 1d1cfe713 -> 217bd0182
Add ExceptionsTest.testCollapseTextWhenExceptionMessageEmpty Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/a710bb71 Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/a710bb71 Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/a710bb71 Branch: refs/heads/master Commit: a710bb7190cf4c05a9c08156e90e7c4593b5e336 Parents: 2227415 Author: Aled Sage <[email protected]> Authored: Wed Feb 18 10:18:14 2015 +0000 Committer: Aled Sage <[email protected]> Committed: Wed Feb 18 12:06:26 2015 +0000 ---------------------------------------------------------------------- .../src/test/java/brooklyn/util/exceptions/ExceptionsTest.java | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/a710bb71/utils/common/src/test/java/brooklyn/util/exceptions/ExceptionsTest.java ---------------------------------------------------------------------- diff --git a/utils/common/src/test/java/brooklyn/util/exceptions/ExceptionsTest.java b/utils/common/src/test/java/brooklyn/util/exceptions/ExceptionsTest.java index 94b49af..5bb83aa 100644 --- a/utils/common/src/test/java/brooklyn/util/exceptions/ExceptionsTest.java +++ b/utils/common/src/test/java/brooklyn/util/exceptions/ExceptionsTest.java @@ -53,6 +53,12 @@ public class ExceptionsTest { assertContains(e, "ConcurrentModification"); } + @Test + public void testCollapseTextWhenExceptionMessageEmpty() throws Exception { + String text = Exceptions.collapseText(new ExecutionException(new IllegalStateException())); + Assert.assertNotNull(text); + } + private void assert12StandardChecks(RuntimeException e, boolean isPropagated) { String collapseText = Exceptions.collapseText(e); log.info("Exception collapsing got: "+collapseText+" ("+e+")");
