jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timur Alperovich <notificati...@github.com>
Subject Re: [jclouds] Swift: do not assume only 1 container in tests. (#800)
Date Wed, 08 Jul 2015 00:21:33 GMT
> @@ -98,7 +99,13 @@ public void testListWithOptions() throws Exception {
>        String lexicographicallyBeforeName = name.substring(0, name.length() - 1);
>        for (String regionId : regions) {
>           ListContainerOptions options = ListContainerOptions.Builder.marker(lexicographicallyBeforeName);
> -         Container container = api.getContainerApi(regionId).list(options).get(0);
> +         Container container = api.getContainerApi(regionId).list(options).firstMatch(new
Predicate<Container>() {
> +            @Override
> +            public boolean apply(Container container) {
> +               return container.getName().equals(name);
> +            }
> +         }).get();
> +         assertNotNull(container);

Done

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