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-labs-openstack] Adds support for Floating IP (#135)
Date Thu, 28 Aug 2014 23:33:50 GMT
> +         server.shutdown();
> +      }
> +   }
> +
> +   public void testListPagedFloatingIP() throws IOException, InterruptedException, URISyntaxException
{
> +      MockWebServer server = mockOpenStackServer();
> +      server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json"))));
> +      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(200).setBody(stringFromResource("/floatingip_list_response_paged1.json"))));
> +      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(200).setBody(stringFromResource("/floatingip_list_response_paged2.json"))));
> +
> +      try {
> +         NeutronApi neutronApi = api(server.getUrl("/").toString(), "openstack-neutron",
overrides);
> +         FloatingIPApi api = neutronApi.getFloatingIPApi("RegionOne").get();
> +
> +         // Note: Lazy! Have to actually look at the collection.
> +         List<FloatingIP> floatingIPs = api.list().concat().toList();

The size gets executed on the collection produced by concat. If we don't do that first, the
test will block waiting for takeRequest.

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