Skip to content

Commit ab1ab73

Browse files
committed
FunctionalTests: fail fast when shared enlistment mount is dead
When GitRepoTests uses a shared enlistment (enlistmentPerTest=false), check IsMounted() in SetupForTest before running git commands. If the mount process crashed during a previous test, all remaining tests in the fixture would fail with the same unhelpful 'does not appear to be mounted' error from the pre-command hook. The early check produces a clear message pointing to the earlier root-cause failure. Assisted-by: Claude Opus 4.6 Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
1 parent 57bb761 commit ab1ab73

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

GVFS/GVFS.FunctionalTests/Tests/GitCommands/GitRepoTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ public virtual void SetupForTest()
137137
{
138138
this.CreateEnlistment();
139139
}
140+
else if (!this.Enlistment.IsMounted())
141+
{
142+
Assert.Fail(
143+
"GVFS mount is not running for the shared enlistment. " +
144+
"A previous test likely caused the mount process to crash. " +
145+
"Check earlier test failures for the root cause.");
146+
}
140147

141148
if (this.validateWorkingTree == Settings.ValidateWorkingTreeMode.SparseMode)
142149
{

0 commit comments

Comments
 (0)