> +      MockWebServer server = mockOpenStackServer();
> +      server.enqueue(addCommonHeaders(new 
> MockResponse().setBody(stringFromResource("/access.json"))));
> +      // Typically we would enqueue a response for the put. However, in this 
> case, test the timeout by not providing one.
> +
> +      try {
> +         Properties overrides = new Properties();
> +
> +         overrides.setProperty(PROPERTY_SO_TIMEOUT, 5000 + ""); // This 
> time-outs the connection
> +         overrides.setProperty(PROPERTY_MAX_RETRIES, 0 + ""); // 0 retries 
> == 1 try. Semantics.
> +         overrides.setProperty(PROPERTY_RETRY_DELAY_START, 0 + ""); // 
> exponential backoff already working for this call. This is the delay BETWEEN 
> attempts.
> +
> +         final SwiftApi api = api(server.getUrl("/").toString(), 
> "openstack-swift", overrides);
> +
> +         String result = api.objectApiInRegionForContainer("DFW", 
> "myContainer").replace("myObject", newStringPayload("swifty"), metadata);
> +
> +         fail("testReplaceTimeout test should have failed with an 
> ExecutionException.");

"with an HttpResponseException"?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/99/files#r12689537

Reply via email to