Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-334

createContainerInLocation returns true even if container exists

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.2
    • 1.6.3, 1.7.0
    • jclouds-blobstore
    • None

    Description

      Javadocs for `createContainerInLocation` state (from http://javadocs.jclouds.cloudbees.net/org/jclouds/blobstore/BlobStore.html):

      "Returns: true if the container was created, false if it already existed."

      The following simple test snippet verifies this:

      ```
      assertThat(blobStore.createContainerInLocation(
      /location=/ null, name)).isTrue();
      assertTrue(blobStore.containerExists(name));
      assertThat(blobStore.createContainerInLocation(
      /location=/ null, name)).isFalse();
      ```

      I ran the test above for a variety of blobstores, and the test fails for pretty much everyblobstore including aws-s3, cloudfiles, hpcloud, azureblob, atmos etc. In my tests, it does pass when using generic S3 endpoints like with Google cloud storage.

      Attachments

        Activity

          People

            gaul Andrew Gaul
            diwaker Diwaker Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: