public void DbContext_timeout_is_used_for_updates() { using (var context = new TimeoutContext()) { context.Database.CommandTimeout = 66; using (context.Database.BeginTransaction()) { context.Space.Add(new SomeSpace()); context.SaveChanges(); } Assert.Equal("66", GetLoggedTimeout()); } }
public void DbContext_timeout_is_used_for_updates() { ExtendedSqlAzureExecutionStrategy.ExecuteNew( () => { using (var context = new TimeoutContext()) { context.Database.CommandTimeout = 66; using (context.Database.BeginTransaction()) { context.Space.Add(new SomeSpace()); context.SaveChanges(); } Assert.Equal("66", GetLoggedTimeout()); } }); }