public void LaunchBackgroundJobSucceeds() { using (CommonRepoSetup setup = new CommonRepoSetup()) using (BackgroundPrefetcher prefetcher = new BackgroundPrefetcher(setup.Context.Tracer, setup.Context.Enlistment, setup.Context.FileSystem, setup.GitObjects)) { prefetcher.LaunchPrefetchJobIfIdle().ShouldBeTrue(); prefetcher.WaitForPrefetchToFinish(); } }
public void LaunchPrefetchJobIfIdleDoesNotLaunchSecondThreadIfFirstInProgress() { using (CommonRepoSetup setup = new CommonRepoSetup()) { BlockedCreateDirectoryFileSystem fileSystem = new BlockedCreateDirectoryFileSystem(setup.FileSystem.RootDirectory); using (BackgroundPrefetcher prefetcher = new BackgroundPrefetcher( setup.Context.Tracer, setup.Context.Enlistment, fileSystem, setup.GitObjects)) { prefetcher.LaunchPrefetchJobIfIdle().ShouldBeTrue(); prefetcher.LaunchPrefetchJobIfIdle().ShouldBeFalse(); fileSystem.UnblockCreateDirectory(); prefetcher.WaitForPrefetchToFinish(); } } }
protected override FileSystemVirtualizer CreateVirtualizer(CommonRepoSetup repo) { this.MockVirtualization = new MockVirtualizationInstance(); this.WindowsVirtualizer = new WindowsFileSystemVirtualizer(repo.Context, repo.GitObjects, this.MockVirtualization, FileSystemVirtualizerTester.NumberOfWorkThreads); return(this.WindowsVirtualizer); }
public WindowsFileSystemVirtualizerTester(CommonRepoSetup repo, string[] projectedFiles) : base(repo, projectedFiles) { }
public WindowsFileSystemVirtualizerTester(CommonRepoSetup repo) : base(repo) { }
protected override FileSystemVirtualizer CreateVirtualizer(CommonRepoSetup repo) { this.MockVirtualization = new MockVirtualizationInstance(); this.MacVirtualizer = new MacFileSystemVirtualizer(repo.Context, repo.GitObjects, this.MockVirtualization); return(this.MacVirtualizer); }
public LinuxFileSystemVirtualizerTester(CommonRepoSetup repo) : base(repo) { }