From d2bbde892ea70b70c9e1b71fd9bebd15144df0e6 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Wed, 3 Oct 2018 13:04:08 -0400 Subject: [PATCH] Remove SharedCacheTests.SecondCloneSucceedsWithMissingTrees This test attempted to cover a rare scenario, but is flaky due to something holding a handle on the pack-files we are trying to delete. --- .../MultiEnlistmentTests/SharedCacheTests.cs | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/SharedCacheTests.cs b/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/SharedCacheTests.cs index 2a55c4c5e6..7ec39205a1 100644 --- a/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/SharedCacheTests.cs +++ b/GVFS/GVFS.FunctionalTests/Tests/MultiEnlistmentTests/SharedCacheTests.cs @@ -267,29 +267,6 @@ public void MountUsesNewLocalCacheKeyWhenLocalCacheDeleted() this.AlternatesFileShouldHaveGitObjectsRoot(enlistment); } - - [TestCase] - public void SecondCloneSucceedsWithMissingTrees() - { - string newCachePath = Path.Combine(this.localCacheParentPath, ".customGvfsCache2"); - GVFSFunctionalTestEnlistment enlistment1 = this.CreateNewEnlistment(localCacheRoot: newCachePath); - File.ReadAllText(Path.Combine(enlistment1.RepoRoot, WellKnownFile)); - - this.AlternatesFileShouldHaveGitObjectsRoot(enlistment1); - - string packDir = Path.Combine(enlistment1.GetObjectRoot(this.fileSystem), "pack"); - string[] packDirFiles = Directory.EnumerateFiles(packDir, "*", SearchOption.AllDirectories).ToArray(); - for (int i = 0; i < packDirFiles.Length; i++) - { - this.fileSystem.DeleteFile(Path.Combine(packDir, packDirFiles[i])); - } - - // Enumerate the root directory, populating the tip commit and root tree - this.fileSystem.EnumerateDirectory(enlistment1.RepoRoot); - - GVFSFunctionalTestEnlistment enlistment2 = this.CreateNewEnlistment(localCacheRoot: newCachePath); - this.fileSystem.EnumerateDirectory(enlistment2.RepoRoot); - } // Override OnTearDownEnlistmentsDeleted rathern than using [TearDown] as the enlistments need to be unmounted before // localCacheParentPath can be deleted (as the SQLite blob sizes database cannot be deleted while GVFS is mounted)