brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [2/4] brooklyn-server git commit: Fix AwsAvailabilityZoneExtensionTest#testFindZones
Date Thu, 05 Jan 2017 14:56:42 GMT
Fix AwsAvailabilityZoneExtensionTest#testFindZones

testFindsZones looked for for specific zone names but they may not be
available on a per-account basis.


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

Branch: refs/heads/master
Commit: 70ad3cfa6de43eb61cf7964112775c8d5529517a
Parents: 4cb9aa7
Author: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Authored: Thu Jan 5 11:38:59 2017 +0000
Committer: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Committed: Thu Jan 5 12:16:10 2017 +0000

----------------------------------------------------------------------
 .../jclouds/zone/AwsAvailabilityZoneExtensionTest.java      | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/70ad3cfa/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/zone/AwsAvailabilityZoneExtensionTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/zone/AwsAvailabilityZoneExtensionTest.java
b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/zone/AwsAvailabilityZoneExtensionTest.java
index 2fbf16f..1e67896 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/zone/AwsAvailabilityZoneExtensionTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/zone/AwsAvailabilityZoneExtensionTest.java
@@ -68,17 +68,16 @@ public class AwsAvailabilityZoneExtensionTest {
     @Test(groups={"Live", "Sanity"})
     public void testFindsZones() throws Exception {
         List<Location> subLocations = zoneExtension.getSubLocations(Integer.MAX_VALUE);
-        List<String> zoneNames = getRegionsOf(subLocations);
-        assertTrue(subLocations.size() >= 3, "zones="+subLocations);
-        assertTrue(zoneNames.containsAll(ImmutableList.of(REGION_NAME+"a", REGION_NAME+"b",
REGION_NAME+"c")), "zoneNames="+zoneNames);
+        assertTrue(subLocations.size() >= 3, "expected at least three zones in " + subLocations);
     }
     
     @Test(groups={"Live", "Sanity"})
     public void testFiltersZones() throws Exception {
         List<Location> subLocations = zoneExtension.getSubLocationsByName(Predicates.containsPattern(REGION_NAME+"[ab]"),
Integer.MAX_VALUE);
         List<String> zoneNames = getRegionsOf(subLocations);
-        assertTrue(subLocations.size() == 2, "zones="+subLocations);
-        assertTrue(zoneNames.containsAll(ImmutableList.of(REGION_NAME+"a", REGION_NAME+"b")),
"zoneNames="+zoneNames);
+        assertTrue(subLocations.size() == 2, "expected two zones in " + subLocations);
+        final ImmutableList<String> expected = ImmutableList.of(REGION_NAME + "a",
REGION_NAME + "b");
+        assertTrue(zoneNames.containsAll(expected), "expected result to contain " + expected
+ ", found zoneNames=" + zoneNames);
     }
     
     // TODO choosing a specific availability zone looks dangerous!


Mime
View raw message