99
1010package org .elasticsearch .repositories .s3 ;
1111
12+ import com .carrotsearch .randomizedtesting .annotations .ThreadLeakScope ;
13+
1214import software .amazon .awssdk .auth .credentials .AwsBasicCredentials ;
1315import software .amazon .awssdk .auth .credentials .AwsCredentials ;
1416import software .amazon .awssdk .auth .credentials .AwsCredentialsProvider ;
3537import static org .hamcrest .Matchers .is ;
3638import static org .hamcrest .Matchers .startsWith ;
3739
38- @ LuceneTestCase . AwaitsFix ( bugUrl = " TODO NOMERGE" )
40+ @ ThreadLeakScope ( ThreadLeakScope . Scope . NONE ) // TODO NOMERGE
3941public class AwsS3ServiceImplTests extends ESTestCase {
4042
4143 private final S3Service .CustomWebIdentityTokenCredentialsProvider webIdentityTokenCredentialsProvider = Mockito .mock (
4244 S3Service .CustomWebIdentityTokenCredentialsProvider .class
4345 );
4446
47+ @ LuceneTestCase .AwaitsFix (bugUrl = "TODO NOMERGE" )
4548 public void testAWSCredentialsDefaultToInstanceProviders () {
4649 final String inexistentClientName = randomAlphaOfLength (8 ).toLowerCase (Locale .ROOT );
4750 final S3ClientSettings clientSettings = S3ClientSettings .getClientSettings (Settings .EMPTY , inexistentClientName );
@@ -55,6 +58,7 @@ public void testAWSCredentialsDefaultToInstanceProviders() {
5558 assertThat (privilegedAWSCredentialsProvider .getCredentialsProvider (), instanceOf (DefaultCredentialsProvider .class ));
5659 }
5760
61+ @ LuceneTestCase .AwaitsFix (bugUrl = "TODO NOMERGE" )
5862 public void testSupportsWebIdentityTokenCredentials () {
5963 Mockito .when (webIdentityTokenCredentialsProvider .resolveCredentials ())
6064 .thenReturn (AwsBasicCredentials .create ("sts_access_key_id" , "sts_secret_key" ));
@@ -73,6 +77,7 @@ public void testSupportsWebIdentityTokenCredentials() {
7377 assertEquals ("sts_secret_key" , credentials .secretAccessKey ());
7478 }
7579
80+ @ LuceneTestCase .AwaitsFix (bugUrl = "TODO NOMERGE" )
7681 public void testAWSCredentialsFromKeystore () {
7782 final MockSecureSettings secureSettings = new MockSecureSettings ();
7883 final String clientNamePrefix = "some_client_name_" ;
@@ -190,13 +195,6 @@ public void testRepositoryMaxRetries() {
190195 launchAWSConfigurationTest (settings , null , -1 , null , null , 5 , S3ClientSettings .Defaults .THROTTLE_RETRIES , 50000 );
191196 }
192197
193- public void testRepositoryThrottleRetries () {
194- final boolean throttling = randomBoolean ();
195-
196- final Settings settings = Settings .builder ().put ("s3.client.default.use_throttle_retries" , throttling ).build ();
197- launchAWSConfigurationTest (settings , null , -1 , null , null , 3 , throttling , 50000 );
198- }
199-
200198 private void launchAWSConfigurationTest (
201199 Settings settings ,
202200 String expectedProxyHost ,
@@ -253,6 +251,7 @@ public void testLoggingCredentialsProviderCatchesErrors() {
253251 assertThat (throwableCaptor .getValue ().getMessage (), equalTo (mockProviderErrorMessage ));
254252 }
255253
254+ @ LuceneTestCase .AwaitsFix (bugUrl = "TODO NOMERGE" )
256255 public void testLoggingCredentialsProviderCatchesErrorsOnRefresh () {
257256 var mockProvider = Mockito .mock (AwsCredentialsProvider .class );
258257 String mockProviderErrorMessage = "mockProvider failed to refresh" ;
0 commit comments