Skip to content

Commit

Permalink
Simulate real test work with a random delay
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Aug 24, 2024
1 parent dbe4fb7 commit 0b0df0f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Sample/UnitTest1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public void FailsOnce()
[Fact]
public void FailsTwice()
{
// Add random delay to simulate actual test execution
Thread.Sleep(Random.Shared.Next(1000, 5000));

var attempt = int.Parse(
File.Exists("failstwice.txt") ?
File.ReadAllText("failstwice.txt") :
Expand Down

0 comments on commit 0b0df0f

Please sign in to comment.