Skip to content

Commit c837bab

Browse files
committed
EnableRetryOnFailure(maxRetryCount: 10)
1 parent 2eceffb commit c837bab

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/IntegrationTests/IntegrationTest.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,10 @@ public async Task Migrate()
2323

2424
await context.SaveChangesAsync();
2525
}
26+
}
27+
public abstract class LocalDbContext : DbContext
28+
{
29+
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) => optionsBuilder.UseSqlServer(
30+
@$"Data Source=(localdb)\mssqllocaldb;Integrated Security=True;MultipleActiveResultSets=True;Database={GetType()};Connection Timeout=300",
31+
o => o.EnableRetryOnFailure(maxRetryCount: 10).CommandTimeout(120));
2632
}

src/IntegrationTests/LocalDbContext.cs

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)