jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <notificati...@github.com>
Subject Re: [jclouds] Prefer OpenStack Regions (#463)
Date Thu, 14 Aug 2014 17:03:40 GMT
>           assertTrue(instanceApi.list().size() >= 2);
> -         for (Instance instance : instancesToDelete.get(zone)) {
> -            DatabaseApi databaseApi = api.getDatabaseApiForZoneAndInstance(zone, instance.getId());
> +         for (Instance instance : instancesToDelete.get(region)) {
> +            DatabaseApi databaseApi = api.getDatabaseApi(region, instance.getId());
>              if (!instance.getName().contains("database_testing"))
>                 continue;
>              assertTrue(databaseApi.list().size() >= 1);

> If you didn't see any issues (can't really imagine why you would see any), I say yes
to all of that.

+1, unsurprisingly ;-) I think it should indeed be recommended because "isEmpty" can be a
simple check (basically !hasNext), but calculating the size can be much more expensive.

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