Skip to content

Commit 0764762

Browse files
committed
Fix PrefetchVerbTests: clear cache before each test
The multi-entry prefetch cache persists across ordered tests, causing cache hits where the tests expect fresh prefetch work. Delete BlobPrefetchCache.dat in [SetUp] so each test starts with a clean cache. Assisted-by: Claude Opus 4.6 Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
1 parent b9ce141 commit 0764762

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/PrefetchVerbTests.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ public PrefetchVerbTests()
3737
this.fileSystem = new SystemIORunner();
3838
}
3939

40+
[SetUp]
41+
public void DeletePrefetchCache()
42+
{
43+
string cachePath = Path.Combine(this.Enlistment.DotGVFSRoot, "BlobPrefetchCache.dat");
44+
if (File.Exists(cachePath))
45+
{
46+
File.Delete(cachePath);
47+
}
48+
}
49+
4050
[TestCase, Order(1)]
4151
public void PrefetchAllMustBeExplicit()
4252
{

0 commit comments

Comments
 (0)