Skip to content

Commit 9a24c5a

Browse files
Merge pull request #73 from StuartFerguson/bug/#68_retryremovereadmodel
Add retry to read model delete
2 parents 67da332 + 13eefc6 commit 9a24c5a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

TransactionProcessor.IntegrationTests/Common/DockerHelper.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,13 @@ private async Task RemoveEstateReadModel()
377377
{
378378
String databaseName = $"EstateReportingReadModel{estateId}";
379379

380-
// Build the connection string (to master)
381-
String connectionString = Setup.GetLocalConnectionString(databaseName);
382-
EstateReportingContext context = new EstateReportingContext(connectionString);
383-
await context.Database.EnsureDeletedAsync(CancellationToken.None);
380+
await Retry.For(async () =>
381+
{
382+
// Build the connection string (to master)
383+
String connectionString = Setup.GetLocalConnectionString(databaseName);
384+
EstateReportingContext context = new EstateReportingContext(connectionString);
385+
await context.Database.EnsureDeletedAsync(CancellationToken.None);
386+
});
384387
}
385388
}
386389

0 commit comments

Comments
 (0)