Skip to content

Commit

Permalink
Make java test independent from js tests
Browse files Browse the repository at this point in the history
- The bucket cleaning might not work during js tests, and can
  be expected
- In such case, the java test should not enforce strict number
  of bucket, but use the existing number when starting...

Issue: CLDSRV-591
  • Loading branch information
williamlardier committed Dec 12, 2024
1 parent a21ea94 commit 967ffc1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/functional/jaws/src/test/java/com/scality/JavaTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

}

0 comments on commit 967ffc1

Please sign in to comment.