You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by ha...@apache.org on 2015/08/12 21:05:04 UTC
[1/2] incubator-brooklyn git commit:
BrooklynLauncherRebindCatalogTest Fix test - assume the order on catalog
rebind doesn't matter
Repository: incubator-brooklyn
Updated Branches:
refs/heads/master e3db4e3cc -> 6de3afc5d
BrooklynLauncherRebindCatalogTest
Fix test - assume the order on catalog rebind doesn't matter
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/8f3f0003
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/8f3f0003
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/8f3f0003
Branch: refs/heads/master
Commit: 8f3f00031c31277fa7e8bbc2bfbdd855da1779d8
Parents: 50b18e7
Author: Valentin Aitken <va...@cloudsoftcorp.com>
Authored: Wed Aug 12 18:23:15 2015 +0300
Committer: Valentin Aitken <va...@cloudsoftcorp.com>
Committed: Wed Aug 12 18:23:15 2015 +0300
----------------------------------------------------------------------
.../launcher/BrooklynLauncherRebindCatalogTest.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/8f3f0003/usage/launcher/src/test/java/org/apache/brooklyn/launcher/BrooklynLauncherRebindCatalogTest.java
----------------------------------------------------------------------
diff --git a/usage/launcher/src/test/java/org/apache/brooklyn/launcher/BrooklynLauncherRebindCatalogTest.java b/usage/launcher/src/test/java/org/apache/brooklyn/launcher/BrooklynLauncherRebindCatalogTest.java
index 48fb538..bbbd442 100644
--- a/usage/launcher/src/test/java/org/apache/brooklyn/launcher/BrooklynLauncherRebindCatalogTest.java
+++ b/usage/launcher/src/test/java/org/apache/brooklyn/launcher/BrooklynLauncherRebindCatalogTest.java
@@ -23,6 +23,7 @@ import java.util.List;
import javax.annotation.Nullable;
+import org.apache.commons.collections.IteratorUtils;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;
@@ -105,7 +106,7 @@ public class BrooklynLauncherRebindCatalogTest {
return catalogItem.getCatalogItemId();
}
});
- Assert.assertTrue(Iterables.elementsEqual(ids, idsFromItems), String.format("Expected %s, found %s", ids, idsFromItems));
+ Assert.assertTrue(compareIterablesWithoutOrderMatters(ids, idsFromItems), String.format("Expected %s, found %s", ids, idsFromItems));
}
protected String newTempPersistenceContainerName() {
@@ -113,4 +114,11 @@ public class BrooklynLauncherRebindCatalogTest {
Os.deleteOnExitRecursively(persistenceDirF);
return persistenceDirF.getAbsolutePath();
}
+
+ private static <T> boolean compareIterablesWithoutOrderMatters(Iterable<T> a, Iterable<T> b) {
+ List<T> aList = IteratorUtils.toList(a.iterator());
+ List<T> bList = IteratorUtils.toList(b.iterator());
+
+ return aList.containsAll(bList) && bList.containsAll(aList);
+ }
}
[2/2] incubator-brooklyn git commit: This closes #815
Posted by ha...@apache.org.
This closes #815
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/6de3afc5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/6de3afc5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/6de3afc5
Branch: refs/heads/master
Commit: 6de3afc5df8dea1a7c2ed69a6fefe1ca098e43b5
Parents: e3db4e3 8f3f000
Author: Hadrian Zbarcea <ha...@apache.org>
Authored: Wed Aug 12 14:52:04 2015 -0400
Committer: Hadrian Zbarcea <ha...@apache.org>
Committed: Wed Aug 12 14:52:04 2015 -0400
----------------------------------------------------------------------
.../launcher/BrooklynLauncherRebindCatalogTest.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/6de3afc5/usage/launcher/src/test/java/org/apache/brooklyn/launcher/BrooklynLauncherRebindCatalogTest.java
----------------------------------------------------------------------