Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mediastore data integ test #1261

Merged
merged 1 commit into from
May 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.Optional;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.reactivestreams.Subscriber;
import software.amazon.awssdk.core.async.AsyncRequestBody;
import software.amazon.awssdk.core.internal.async.ByteArrayAsyncRequestBody;
Expand All @@ -39,11 +38,9 @@
import software.amazon.awssdk.testutils.Waiter;
import software.amazon.awssdk.testutils.service.AwsIntegrationTestBase;

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

private static MediaStoreClient mediaStoreClient;
private static MediaStoreDataClient syncClientWithApache;
Expand Down Expand Up @@ -81,15 +78,16 @@ public static void setup() {

putObjectRequest = PutObjectRequest.builder()
.contentType("application/octet-stream")
.path("/foo")
.path(PATH)
.build();
}

@AfterClass
public static void tearDown() throws Exception {
waitContainerToBeActive();
// Randomly this method is throwing ContainerInUseException
Thread.sleep(2000);

syncClientWithApache.deleteObject(b -> b.path(PATH));

mediaStoreClient.deleteContainer(r -> r.containerName(CONTAINER_NAME));
}

Expand Down