diff --git a/tests/functional/jaws/src/test/java/com/scality/JavaTest.java b/tests/functional/jaws/src/test/java/com/scality/JavaTest.java index 283f94b24c..307de0c660 100644 --- a/tests/functional/jaws/src/test/java/com/scality/JavaTest.java +++ b/tests/functional/jaws/src/test/java/com/scality/JavaTest.java @@ -49,14 +49,15 @@ public class JavaTest { } @Test public void testCreateBucket() throws Exception { + Object[] initialBuckets=getS3Client().listBuckets().toArray(); getS3Client().createBucket(bucketName); Object[] buckets=getS3Client().listBuckets().toArray(); - Assert.assertEquals(buckets.length,1); + Assert.assertEquals(buckets.length, initialBuckets.length + 1); Bucket bucket = (Bucket) buckets[0]; Assert.assertEquals(bucketName, bucket.getName()); getS3Client().deleteBucket(bucketName); Object[] bucketsAfter=getS3Client().listBuckets().toArray(); - Assert.assertEquals(bucketsAfter.length, 0); + Assert.assertEquals(bucketsAfter.length, initialBuckets); } }