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

[3.8.x] Added some small logs to Aws2KinesisFirehoseTest for better debugging #6189

Merged
Merged
Show file tree
Hide file tree
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 @@ -83,9 +83,10 @@ public void firehose() {
final Config config = ConfigProvider.getConfig();

final String bucketName = config.getValue("aws-kinesis.s3-bucket-name", String.class);

LOG.infof("Bucket '%s' should contain objects.", bucketName);
Awaitility.await().pollInterval(1, TimeUnit.SECONDS).atMost(120, TimeUnit.SECONDS).until(
() -> {
LOG.infof("Reading objects from bucket '%s'", bucketName);
final ListObjectsResponse objects = client
.listObjects(ListObjectsRequest.builder().bucket(bucketName).build());
final List<S3Object> objs = objects.contents();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,12 @@ public void customize(Aws2TestEnvContext envContext) {
final String bucketArn = "arn:aws:s3:::" + bucketName;
envContext.property("aws-kinesis.s3-bucket-name", bucketName);
s3Client.createBucket(CreateBucketRequest.builder().bucket(bucketName).build());
envContext.closeable(() -> s3Client.deleteBucket(DeleteBucketRequest.builder().bucket(bucketName).build()));
envContext.closeable(() -> {
LOG.info("Deleting bucket " + bucketName);
s3Client.deleteBucket(DeleteBucketRequest.builder().bucket(bucketName).build());
});
envContext.closeable(() -> {
LOG.info("Deleting objects from bucket bucket " + bucketName);
final ListObjectsResponse objects = s3Client.listObjects(
ListObjectsRequest.builder()
.bucket(bucketName)
Expand Down
Loading