public void Commit_WLockExists_GetTimeoutException() { HgRunner.TimeoutSecondsOverrideForUnitTests = 1; using (var setup = new HgTestSetup()) using (setup.GetWLock()) { Assert.Throws <TimeoutException>(() => setup.Repository.Commit(false, "test")); } }
public void AddAndCheckinFile_WLockExists_GetTimeoutException() { HgRunner.TimeoutSecondsOverrideForUnitTests = 1; using (var setup = new HgTestSetup()) using (setup.GetWLock()) { Assert.Throws <TimeoutException>(() => setup.Repository.AddAndCheckinFile(setup.Root.GetNewTempFile(true).Path)); } }
public void AddAndCheckinFile_WLockExists_GetTimeoutException() { HgRunner.TimeoutSecondsOverrideForUnitTests = 1; using (var setup = new HgTestSetup()) using (setup.GetWLock()) { Assert.Throws<TimeoutException>(() => setup.Repository.AddAndCheckinFile(setup.Root.GetNewTempFile(true).Path)); } }
public void Pull_FileIsLocked_GetTimeoutException() { HgRunner.TimeoutSecondsOverrideForUnitTests = 1; using (var setup = new HgTestSetup()) using (setup.GetWLock()) { var path = setup.Root.GetNewTempFile(true).Path; setup.Repository.AddAndCheckinFile(path); using (new StreamWriter(path)) { Assert.Throws <TimeoutException>(() => setup.Repository.Update()); } } }
public void Pull_FileIsLocked_GetTimeoutException() { HgRunner.TimeoutSecondsOverrideForUnitTests = 1; using (var setup = new HgTestSetup()) using (setup.GetWLock()) { var path = setup.Root.GetNewTempFile(true).Path; setup.Repository.AddAndCheckinFile(path); using (new StreamWriter(path)) { Assert.Throws<TimeoutException>(() => setup.Repository.Update()); } } }
public void Commit_WLockExists_GetTimeoutException() { HgRunner.TimeoutSecondsOverrideForUnitTests = 1; using (var setup = new HgTestSetup()) using (setup.GetWLock()) { Assert.Throws<TimeoutException>(() => setup.Repository.Commit(false, "test")); } }