From 88a1b6978e5d9d82eb031c64e375487dbad133fa Mon Sep 17 00:00:00 2001 From: Yang Wang Date: Wed, 13 Nov 2024 14:49:15 +1100 Subject: [PATCH] [Test] Enable logging for AmazonHttpClient (#116560) (#116702) If sending request fails locally without reaching the server, the retryable exception is logged differently. This PR enables the logging for this scenario. Relates: #88841 Relates: #101608 (cherry picked from commit 5204902c4dd60f9364d43441f987f04ecd3a2f2e) # Conflicts: # modules/repository-s3/src/internalClusterTest/java/org/elasticsearch/repositories/s3/S3BlobStoreRepositoryTests.java --- .../repositories/s3/S3BlobStoreRepositoryTests.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/repository-s3/src/internalClusterTest/java/org/elasticsearch/repositories/s3/S3BlobStoreRepositoryTests.java b/modules/repository-s3/src/internalClusterTest/java/org/elasticsearch/repositories/s3/S3BlobStoreRepositoryTests.java index 4eb5363d90251..12220dc51ea8f 100644 --- a/modules/repository-s3/src/internalClusterTest/java/org/elasticsearch/repositories/s3/S3BlobStoreRepositoryTests.java +++ b/modules/repository-s3/src/internalClusterTest/java/org/elasticsearch/repositories/s3/S3BlobStoreRepositoryTests.java @@ -188,7 +188,10 @@ protected Settings nodeSettings(int nodeOrdinal, Settings otherSettings) { } @Override - @TestIssueLogging(issueUrl = "https://github.com/elastic/elasticsearch/issues/88841", value = "com.amazonaws.request:DEBUG") + @TestIssueLogging( + issueUrl = "https://github.com/elastic/elasticsearch/issues/88841", + value = "com.amazonaws.request:DEBUG,com.amazonaws.http.AmazonHttpClient:TRACE" + ) public void testRequestStats() throws Exception { super.testRequestStats(); } @@ -234,8 +237,10 @@ public void testAbortRequestStats() throws Exception { assertEquals(assertionErrorMsg, mockCalls, sdkRequestCounts); } - @TestIssueLogging(issueUrl = "https://github.com/elastic/elasticsearch/issues/101608", value = "com.amazonaws.request:DEBUG") - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/101608") + @TestIssueLogging( + issueUrl = "https://github.com/elastic/elasticsearch/issues/101608", + value = "com.amazonaws.request:DEBUG,com.amazonaws.http.AmazonHttpClient:TRACE" + ) public void testMetrics() throws Exception { // Create the repository and perform some activities final String repository = createRepository(randomRepositoryName(), false);