Skip to content

Commit 56f393a

Browse files
stabilize reconciliation login retry
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
1 parent 332a7b1 commit 56f393a

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

TransactionProcessorACL.IntegrationTests/Shared/SharedSteps.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,12 @@ public async Task GivenIAmLoggedInAsWithPasswordForMerchantForEstateWithClient(S
9696
EstateDetails1 estateDetails = this.TestingContext.GetEstateDetails(estateName);
9797
Guid merchantId = estateDetails.EstateDetails.GetMerchantId(merchantName);
9898
ClientDetails clientDetails = this.TestingContext.GetClientDetails(clientId);
99-
100-
Result<TokenResponse> tokenResponseResult = await this.TestingContext.DockerHelper.SecurityServiceClient
101-
.GetToken(username, password, clientId, clientDetails.ClientSecret, CancellationToken.None).ConfigureAwait(false);
102-
tokenResponseResult.IsSuccess.ShouldBeTrue();
99+
Result<TokenResponse> tokenResponseResult = null;
100+
await Retry.For(async () => {
101+
tokenResponseResult = await this.TestingContext.DockerHelper.SecurityServiceClient
102+
.GetToken(username, password, clientId, clientDetails.ClientSecret, CancellationToken.None).ConfigureAwait(false);
103+
tokenResponseResult.IsSuccess.ShouldBeTrue();
104+
});
103105
estateDetails.AddMerchantUserToken(merchantId, username, tokenResponseResult.Data.AccessToken);
104106
}
105107
/// <summary>
@@ -485,4 +487,4 @@ public async Task WhenIGetTheMerchantContractInformationForMerchantForEstateTheR
485487

486488
#endregion
487489
}
488-
}
490+
}

0 commit comments

Comments
 (0)