File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -866,29 +866,13 @@ public function testDeleteCryptoKey()
866866 */
867867 public function testListRetiredResources ($ deletedKeyId )
868868 {
869- // Add retry logic for eventual consistency
870- $ attempts = 0 ;
871- $ found = false ;
872-
873- while ($ attempts < 10 && !$ found ) {
874- // runFunctionSnippet captures output already.
875- list (, $ output ) = $ this ->runFunctionSnippet ('list_retired_resources ' , [
876- self ::$ projectId ,
877- self ::$ locationId
878- ]);
879-
880- if (strpos ($ output , $ deletedKeyId ) !== false ) {
881- $ found = true ;
882- $ this ->assertStringContainsString ('Retired Resource Name ' , $ output );
883- } else {
884- sleep (1 );
885- $ attempts ++;
886- }
887- }
869+ list (, $ output ) = $ this ->runFunctionSnippet ('list_retired_resources ' , [
870+ self ::$ projectId ,
871+ self ::$ locationId
872+ ]);
888873
889- if (!$ found ) {
890- $ this ->fail ("Did not find deleted key $ deletedKeyId in retired resources list. " );
891- }
874+ $ this ->assertStringContainsString ('Retired Resource Name ' , $ output );
875+ $ this ->assertStringContainsString ($ deletedKeyId , $ output );
892876 }
893877
894878 /**
You can’t perform that action at this time.
0 commit comments