jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zack Shoylev <notificati...@github.com>
Subject Re: [jclouds] Adds a top-level zone filter. (#283)
Date Wed, 05 Feb 2014 18:53:13 GMT
> @@ -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);

The view should not be a problem. This is basically all new test-only functionality.
Good point on the Splitter.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/283/files#r9472764
Mime
View raw message