mirror of https://github.com/apache/jclouds.git
fixed test glitch in azureblob
This commit is contained in:
parent
181f1de4fd
commit
15af98ba02
|
@ -50,6 +50,7 @@ import org.jclouds.io.Payloads;
|
||||||
import org.jclouds.logging.log4j.config.Log4JLoggingModule;
|
import org.jclouds.logging.log4j.config.Log4JLoggingModule;
|
||||||
import org.jclouds.rest.BaseRestClientLiveTest;
|
import org.jclouds.rest.BaseRestClientLiveTest;
|
||||||
import org.jclouds.util.Strings2;
|
import org.jclouds.util.Strings2;
|
||||||
|
import org.jclouds.util.Throwables2;
|
||||||
import org.testng.annotations.BeforeGroups;
|
import org.testng.annotations.BeforeGroups;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
|
@ -320,8 +321,9 @@ public class AzureBlobClientLiveTest extends BaseRestClientLiveTest {
|
||||||
client.getBlob(privateContainer, object.getProperties().getName(), GetOptions.Builder
|
client.getBlob(privateContainer, object.getProperties().getName(), GetOptions.Builder
|
||||||
.ifETagDoesntMatch(newEtag));
|
.ifETagDoesntMatch(newEtag));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
assertEquals(e.getCause().getClass(), HttpResponseException.class);
|
HttpResponseException httpEx = Throwables2.getFirstThrowableOfType(e, HttpResponseException.class);
|
||||||
assertEquals(((HttpResponseException) e.getCause()).getResponse().getStatusCode(), 304);
|
assert (httpEx != null) : "expected http exception, not " + e;
|
||||||
|
assertEquals(httpEx.getResponse().getStatusCode(), 304);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Matching ETag TODO this shouldn't fail!!!
|
// Matching ETag TODO this shouldn't fail!!!
|
||||||
|
|
Loading…
Reference in New Issue