Skip to content

Commit 11dfddc

Browse files
committed
use info level debuf logs
1 parent cac736b commit 11dfddc

File tree

7 files changed

+23
-43
lines changed

7 files changed

+23
-43
lines changed

test/s3-tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mvn clean install -P s3-regression-tests -pl :stability-tests
2525
- The tests are built using [JUnit 5](https://junit.org/junit5/). Make sure you are using the correct APIs and mixing of
2626
Junit 4 and Junit 5 APIs on the same test can have unexpected results.
2727

28-
- All tests should have the suffix of `RegressionTesting`, eg: ``
28+
- All tests should have the suffix of `RegressionTesting`, eg: `DownloadStreamingRegressionTesting`
2929

3030

3131

test/s3-tests/src/it/java/software/amazon/awssdk/services/s3/regression/ControlPlaneOperationRegressionTesting.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class ControlPlaneOperationRegressionTesting extends BaseS3RegressionTest
4848
void deleteObject(TestConfig config) throws Exception {
4949
assumeNotAccessPointWithPathStyle(config);
5050

51-
LOG.debug(() -> "Running deleteObject with config: " + config.toString());
51+
LOG.info(() -> "Running deleteObject with config: " + config.toString());
5252

5353
String bucket = bucketForType(config.getBucketType());
5454
String key = putRandomObject(config.getBucketType());
@@ -81,7 +81,7 @@ void restoreObject(TestConfig config) throws Exception {
8181
Assumptions.assumeFalse(config.getBucketType() == BucketType.EOZ,
8282
"Restore is not supported for S3 Express");
8383

84-
LOG.debug(() -> "Running restoreObject with config: " + config);
84+
LOG.info(() -> "Running restoreObject with config: " + config);
8585

8686
String bucket = bucketForType(config.getBucketType());
8787
String key = putRandomArchivedObject(config.getBucketType());

test/s3-tests/src/it/java/software/amazon/awssdk/services/s3/regression/DownloadStreamingRegressionTesting.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ void testCleanup() {
104104
try {
105105
Files.delete(p);
106106
} catch (Exception e) {
107-
LOG.error(() -> String.format("Unable to delete file %s", p.toString()), e);
107+
LOG.info(() -> String.format("Unable to delete file %s", p.toString()), e);
108108
}
109109
});
110110
}
@@ -114,7 +114,7 @@ void testCleanup() {
114114
void downloadObject(DownloadConfig config) throws Exception {
115115
assumeNotAccessPointWithPathStyle(config.baseConfig());
116116

117-
LOG.debug(() -> "Running downloadObject with config: " + config);
117+
LOG.info(() -> "Running downloadObject with config: " + config);
118118

119119
String key = config.contentSize().s3Object().key();
120120
GetObjectRequest.Builder b = GetObjectRequest.builder()
@@ -158,7 +158,7 @@ void downloadObject(DownloadConfig config) throws Exception {
158158
// 16 KiB
159159
static ObjectWithCRC uploadObjectSmall() throws IOException {
160160
String name = String.format("%s-%s.dat", System.currentTimeMillis(), UUID.randomUUID());
161-
LOG.debug(() -> "test setup - uploading small test object: " + name);
161+
LOG.info(() -> "test setup - uploading small test object: " + name);
162162
ByteArrayOutputStream os = new ByteArrayOutputStream();
163163
byte[] rand = new byte[1024];
164164
for (int i = 0; i < 16; i++) {
@@ -182,7 +182,7 @@ static ObjectWithCRC uploadObjectSmall() throws IOException {
182182
// 80 MiB
183183
static ObjectWithCRC uploadObjectLarge() throws IOException {
184184
String name = String.format("%s-%s.dat", System.currentTimeMillis(), UUID.randomUUID());
185-
LOG.debug(() -> "test setup - uploading large test object: " + name);
185+
LOG.info(() -> "test setup - uploading large test object: " + name);
186186
ByteArrayOutputStream os = new ByteArrayOutputStream();
187187
byte[] rand = new byte[1024 * 1024];
188188
for (int i = 0; i < 80; i++) {
@@ -207,7 +207,7 @@ static ObjectWithCRC uploadObjectLarge() throws IOException {
207207
// 80MiB, multipart default config
208208
static ObjectWithCRC uploadMultiPartObject() throws Exception {
209209
String name = String.format("%s-%s.dat", System.currentTimeMillis(), UUID.randomUUID());
210-
LOG.debug(() -> "test setup - uploading large test object - multipart: " + name);
210+
LOG.info(() -> "test setup - uploading large test object - multipart: " + name);
211211
ByteArrayOutputStream os = new ByteArrayOutputStream();
212212
byte[] rand = new byte[8 * 1024 * 1024];
213213
for (int i = 0; i < 10; i++) {
@@ -224,7 +224,7 @@ static ObjectWithCRC uploadMultiPartObject() throws Exception {
224224

225225
static void doMultipartUpload(BucketType bucketType, String objectName, byte[] content) {
226226
String bucket = bucketForType(bucketType);
227-
LOG.debug(() -> String.format("Uploading multipart object for bucket type: %s - %s", bucketType, bucket));
227+
LOG.info(() -> String.format("Uploading multipart object for bucket type: %s - %s", bucketType, bucket));
228228
CreateMultipartUploadRequest createMulti = CreateMultipartUploadRequest.builder()
229229
.bucket(bucket)
230230
.key(objectName)
@@ -241,7 +241,7 @@ static void doMultipartUpload(BucketType bucketType, String objectName, byte[] c
241241
int startIndex = partSize * i;
242242
int endIndex = startIndex + partSize;
243243
byte[] partContent = Arrays.copyOfRange(content, startIndex, endIndex);
244-
LOG.debug(() -> "Uploading part: " + partNumber);
244+
LOG.info(() -> "Uploading part: " + partNumber);
245245
UploadPartResponse partResponse = s3.uploadPart(req -> req.partNumber(partNumber)
246246
.uploadId(uploadId)
247247
.key(objectName)
@@ -251,10 +251,10 @@ static void doMultipartUpload(BucketType bucketType, String objectName, byte[] c
251251
.eTag(partResponse.eTag())
252252
.partNumber(partNumber)
253253
.build());
254-
LOG.debug(() -> String.format("done part %s - etag: %s: ", partNumber, partResponse.eTag()));
254+
LOG.info(() -> String.format("done part %s - etag: %s: ", partNumber, partResponse.eTag()));
255255
}
256256

257-
LOG.debug(() -> "Finishing MPU, completed parts: " + completedParts);
257+
LOG.info(() -> "Finishing MPU, completed parts: " + completedParts);
258258

259259
s3.completeMultipartUpload(req -> req.multipartUpload(u -> u.parts(completedParts))
260260
.bucket(bucket)
@@ -475,7 +475,7 @@ private static Path createTempDir(String path) {
475475
try {
476476
return Files.createDirectories(Paths.get(path));
477477
} catch (Exception e) {
478-
LOG.error(() -> "Unable to create directory", e);
478+
LOG.info(() -> "Unable to create directory", e);
479479
throw new RuntimeException(e);
480480
}
481481
}

test/s3-tests/src/it/java/software/amazon/awssdk/services/s3/regression/S3ChecksumsTestUtils.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private S3ChecksumsTestUtils() {
5959
}
6060

6161
public static String createBucket(S3Client s3, String name, Logger log) {
62-
log.debug(() -> "Creating bucket: " + name);
62+
log.info(() -> "Creating bucket: " + name);
6363
createBucket(s3, name, 3, log);
6464
return name;
6565
}
@@ -75,14 +75,14 @@ public static void createBucket(S3Client s3, String bucketName, int retryCount,
7575
.build())
7676
.build());
7777
} catch (S3Exception e) {
78-
log.debug(() -> "Error attempting to create bucket: " + bucketName);
78+
log.info(() -> "Error attempting to create bucket: " + bucketName);
7979
if ("BucketAlreadyOwnedByYou".equals(e.awsErrorDetails().errorCode())) {
80-
log.debug(() -> String.format("%s bucket already exists, likely leaked by a previous run%n", bucketName));
80+
log.info(() -> String.format("%s bucket already exists, likely leaked by a previous run%n", bucketName));
8181
} else if ("TooManyBuckets".equals(e.awsErrorDetails().errorCode())) {
82-
log.debug(() -> "Printing all buckets for debug:");
83-
s3.listBuckets().buckets().forEach(l -> log.debug(l::toString));
82+
log.info(() -> "Printing all buckets for debug:");
83+
s3.listBuckets().buckets().forEach(l -> log.info(l::toString));
8484
if (retryCount < 2) {
85-
log.debug(() -> "Retrying...");
85+
log.info(() -> "Retrying...");
8686
createBucket(s3, bucketName, retryCount + 1, log);
8787
} else {
8888
throw e;
@@ -101,7 +101,7 @@ public static void createBucket(S3Client s3, String bucketName, int retryCount,
101101

102102
public static String createEozBucket(S3Client s3, String bucketName, Logger log) {
103103
String eozBucketName = bucketName;
104-
log.debug(() -> "Creating EOZ bucket: " + eozBucketName);
104+
log.info(() -> "Creating EOZ bucket: " + eozBucketName);
105105
CreateBucketConfiguration cfg =
106106
CreateBucketConfiguration.builder()
107107
.bucket(info -> info.dataRedundancy(DataRedundancy.SINGLE_AVAILABILITY_ZONE)
@@ -160,7 +160,7 @@ private static String waitForMrapToBeReady(S3ControlClient s3Control, String acc
160160
}
161161
GetMultiRegionAccessPointResponse response =
162162
s3Control.getMultiRegionAccessPoint(r -> r.accountId(accountId).name(mrapName));
163-
log.debug(() -> "Wait response: " + response);
163+
log.info(() -> "Wait response: " + response);
164164
getMrapResponse = response;
165165
} while (MultiRegionAccessPointStatus.READY != getMrapResponse.accessPoint().status()
166166
&& Duration.between(Instant.now(), waitStart).compareTo(Duration.ofMinutes(5)) < 0);

test/s3-tests/src/it/java/software/amazon/awssdk/services/s3/regression/UploadStreamingRegressionTesting.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ void putObject(UploadConfig config) throws Exception {
141141
&& config.getBodyType() == BodyType.CONTENT_PROVIDER_NO_LENGTH,
142142
"Async Java based support unknown content length");
143143

144-
LOG.debug(() -> "Running putObject with config: " + config);
144+
LOG.info(() -> "Running putObject with config: " + config);
145145

146146
BucketType bucketType = config.getBaseConfig().getBucketType();
147147

test/s3-tests/src/it/resources/junit-platform.properties

Lines changed: 0 additions & 20 deletions
This file was deleted.

test/s3-tests/src/test/resources/log4j2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<Root level="WARN">
2525
<AppenderRef ref="ConsoleAppender"/>
2626
</Root>
27-
<Logger name="software.amazon.awssdk.services.s3.regression" level="DEBUG" />
27+
<Logger name="software.amazon.awssdk.services.s3.regression" level="INFO" />
2828
<!-- <Logger name="software.amazon.awssdk" level="WARN" />-->
2929
<!-- <Logger name="software.amazon.awssdk.request" level="DEBUG" />-->
3030
<!-- <Logger name="org.apache.http.wire" level="DEBUG" />-->

0 commit comments

Comments
 (0)