@@ -430,42 +430,6 @@ public void defaultProfileFileSupplier_isStaticOrHasIdentityCaching() {
430430 assertThat (secondGet ).isSameAs (firstGet );
431431 }
432432
433- @ Test
434- public void defaultProfileFileSupplier_isRefreshing () {
435- EnvironmentVariableHelper .run (env -> {
436- try {
437- File credentialFile = tempFolder .newFile ();
438- writeTestCredentialsFile (credentialFile , "akid1" , "sak" );
439- env .set ("AWS_SHARED_CREDENTIALS_FILE" , credentialFile .getPath ());
440- env .set ("AWS_CONFIG_FILE" , tempFolder .getRoot ().toPath ().resolve ("does-not-exist" ).toString ());
441- SdkClientConfiguration config =
442- testClientBuilder ().build ().clientConfiguration ;
443-
444- Supplier <ProfileFile > defaultProfileFileSupplier = config .option (PROFILE_FILE_SUPPLIER );
445- ProfileFile firstGet = defaultProfileFileSupplier .get ();
446-
447- writeTestCredentialsFile (credentialFile , "updatedAkid" , "updatedSak" );
448-
449- ProfileFile secondGet = Waiter .run (() -> defaultProfileFileSupplier .get ())
450- .until ((p ) -> !p .equals (firstGet ))
451- .orFailAfter (Duration .ofSeconds (10 ));
452-
453- assertThat (secondGet ).isNotSameAs (firstGet );
454- assertThat (secondGet .profile ("default" )).isPresent ();
455- assertThat (secondGet .profile ("default" ).get ()).satisfies (profile -> {
456- assertThat (profile .property ("aws_access_key_id" ))
457- .isEqualTo (Optional .of ("updatedAkid" ));
458- assertThat (profile .property ("aws_secret_access_key" ))
459- .isEqualTo (Optional .of ("updatedSak" ));
460- });
461-
462- }
463- catch (IOException e ) {
464- throw new RuntimeException (e );
465- }
466- });
467- }
468-
469433 private SdkDefaultClientBuilder <TestClientBuilder , TestClient > testClientBuilder () {
470434 ClientOverrideConfiguration overrideConfig =
471435 ClientOverrideConfiguration .builder ()
0 commit comments