Skip to content

Commit

Permalink
Deliberately try to fail E2E tests
Browse files Browse the repository at this point in the history
This is so that I can prove that this is necessary for the solution
  • Loading branch information
rmunn committed May 28, 2024
1 parent d168872 commit a33da7c
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions backend/LexBoxApi/Services/HgService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,15 @@ public async Task WaitForRepoEmptyState(string code, RepoEmptyState expectedStat
var done = false;
while (!done)
{
var hash = await GetTipHash(code);
var isEmpty = hash == AllZeroHash;
done = expectedState switch
{
RepoEmptyState.Empty => isEmpty,
RepoEmptyState.NonEmpty => !isEmpty
};
if (!done) await Task.Delay(2500);
done = true; // Deliberately try to fail tests
// var hash = await GetTipHash(code);
// var isEmpty = hash == AllZeroHash;
// done = expectedState switch
// {
// RepoEmptyState.Empty => isEmpty,
// RepoEmptyState.NonEmpty => !isEmpty
// };
// if (!done) await Task.Delay(2500);
}
}

Expand Down

0 comments on commit a33da7c

Please sign in to comment.