Skip to content

Blob unit test failures in the dev-bookmark branch #37

Description

@jcookems

In the dev-bookmark branch, the following unit tests fail:

  • com.microsoft.windowsazure.services.blob.BlobServiceIntegrationTest
    • getBlobwithIfNoneMatchETagAccessconditionWorks
    • getBlobWithIfModifiedSinceAccessconditionWorks

This issue was introduced with 802e9b0 , where PipelineHelpers.ThrowIfError changed what it considered to be an error from >=300 to >=400. This change is correct, but the getBlob code should consider >=300 as an error, because the server returns a 304 if it cannot give a match for the If-* headers.

A potential fix is to change the BlobRestProxy code to replace

    ThrowIfError(response);

with something like:

    // 304 is returned if the blob requested does not match the If-None-Match, etc. headers.
    if (response.getStatus() >= 300) {
        throw new UniformInterfaceException(response);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions