|
24 | 24 | import java.util.Optional;
|
25 | 25 | import org.junit.AfterClass;
|
26 | 26 | import org.junit.BeforeClass;
|
27 |
| -import org.junit.Ignore; |
28 | 27 | import org.reactivestreams.Subscriber;
|
29 | 28 | import software.amazon.awssdk.core.async.AsyncRequestBody;
|
30 | 29 | import software.amazon.awssdk.core.internal.async.ByteArrayAsyncRequestBody;
|
|
39 | 38 | import software.amazon.awssdk.testutils.Waiter;
|
40 | 39 | import software.amazon.awssdk.testutils.service.AwsIntegrationTestBase;
|
41 | 40 |
|
42 |
| -//TODO deleteContainer fails with ContainerInUseException with no error message. Needs investigation |
43 |
| -// The test cases work fine. |
44 |
| -@Ignore |
45 | 41 | public class MediaStoreDataIntegrationTest extends AwsIntegrationTestBase {
|
46 | 42 | private static final String CONTAINER_NAME = "java-sdk-test-" + Instant.now().toEpochMilli();
|
| 43 | + private static final String PATH = "/foo/bar"; |
47 | 44 |
|
48 | 45 | private static MediaStoreClient mediaStoreClient;
|
49 | 46 | private static MediaStoreDataClient syncClientWithApache;
|
@@ -81,15 +78,16 @@ public static void setup() {
|
81 | 78 |
|
82 | 79 | putObjectRequest = PutObjectRequest.builder()
|
83 | 80 | .contentType("application/octet-stream")
|
84 |
| - .path("/foo") |
| 81 | + .path(PATH) |
85 | 82 | .build();
|
86 | 83 | }
|
87 | 84 |
|
88 | 85 | @AfterClass
|
89 | 86 | public static void tearDown() throws Exception {
|
90 | 87 | waitContainerToBeActive();
|
91 |
| - // Randomly this method is throwing ContainerInUseException |
92 |
| - Thread.sleep(2000); |
| 88 | + |
| 89 | + syncClientWithApache.deleteObject(b -> b.path(PATH)); |
| 90 | + |
93 | 91 | mediaStoreClient.deleteContainer(r -> r.containerName(CONTAINER_NAME));
|
94 | 92 | }
|
95 | 93 |
|
|
0 commit comments