> @@ -74,6 +76,19 @@ protected String setIfTestSystemPropertyPresent(Properties
> overrides, String key
> return null;
> }
>
> + /**
> + * This helps live testing against specific zones only.
> + * @param zones A list of zones, usually from getConfiguredZones()
> + * @return Filters zones based on the variable test.live.region, such as
> test.live.region=ORD
> + */
> + protected Set<String> filterZones(Set<String> zones) {
> + if(System.getProperty("test.live.region")==null){
> + return zones; // unfiltered
> + }
> + Set<String> zoneFilter =
> Sets.newHashSet(System.getProperty("test.live.region").split(","));
> + return Sets.intersection(zones, zoneFilter);
Something like:
```
String zonesToTestList = System.getProperty("test.live.region");
if (zonesToTestList == null) {
return zones; // no filter applied
}
Set<String> zonesToTest =
Sets.newHashSet(Splitter.on(',').split(zonesToTestList ));
return Sets.intersection(zones, zonesToTest);
```
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/283/files#r9472629