Skip to content

Commit c07ed67

Browse files
committed
Fix mediastore data integ test
1 parent 94b2b64 commit c07ed67

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

services/mediastoredata/src/it/java/software/amazon/awssdk/services/mediastoredata/MediaStoreDataIntegrationTest.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import java.util.Optional;
2525
import org.junit.AfterClass;
2626
import org.junit.BeforeClass;
27-
import org.junit.Ignore;
2827
import org.reactivestreams.Subscriber;
2928
import software.amazon.awssdk.core.async.AsyncRequestBody;
3029
import software.amazon.awssdk.core.internal.async.ByteArrayAsyncRequestBody;
@@ -39,11 +38,9 @@
3938
import software.amazon.awssdk.testutils.Waiter;
4039
import software.amazon.awssdk.testutils.service.AwsIntegrationTestBase;
4140

42-
//TODO deleteContainer fails with ContainerInUseException with no error message. Needs investigation
43-
// The test cases work fine.
44-
@Ignore
4541
public class MediaStoreDataIntegrationTest extends AwsIntegrationTestBase {
4642
private static final String CONTAINER_NAME = "java-sdk-test-" + Instant.now().toEpochMilli();
43+
private static final String PATH = "/foo/bar";
4744

4845
private static MediaStoreClient mediaStoreClient;
4946
private static MediaStoreDataClient syncClientWithApache;
@@ -81,15 +78,16 @@ public static void setup() {
8178

8279
putObjectRequest = PutObjectRequest.builder()
8380
.contentType("application/octet-stream")
84-
.path("/foo")
81+
.path(PATH)
8582
.build();
8683
}
8784

8885
@AfterClass
8986
public static void tearDown() throws Exception {
9087
waitContainerToBeActive();
91-
// Randomly this method is throwing ContainerInUseException
92-
Thread.sleep(2000);
88+
89+
syncClientWithApache.deleteObject(b -> b.path(PATH));
90+
9391
mediaStoreClient.deleteContainer(r -> r.containerName(CONTAINER_NAME));
9492
}
9593

0 commit comments

Comments
 (0)