Skip to content

Commit

Permalink
Added details to test output
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMpn committed Sep 2, 2022
1 parent db491b2 commit e8ad01b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MarkMpn.Sql4Cds.Engine.Tests/AdoProviderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -785,15 +785,15 @@ public void WaitFor()
stopwatch.Start();
cmd.ExecuteNonQuery();
stopwatch.Stop();
Assert.IsTrue(stopwatch.ElapsedMilliseconds < 100);
Assert.IsTrue(stopwatch.ElapsedMilliseconds < 100, "Inserting record expected to take <100ms, actually took " + stopwatch.Elapsed);

cmd.CommandText = "WAITFOR DELAY '00:00:02'; INSERT INTO contact (firstname, lastname) VALUES ('Mark', 'Carrington');";
cmd.ExecuteNonQuery();

stopwatch.Restart();
cmd.ExecuteNonQuery();
stopwatch.Stop();
Assert.IsTrue(stopwatch.ElapsedMilliseconds > 2000 && stopwatch.ElapsedMilliseconds < 2100);
Assert.IsTrue(stopwatch.ElapsedMilliseconds > 2000 && stopwatch.ElapsedMilliseconds < 2100, "WAITFOR + INSERT expected to take 2.0s - 2.1s, actually took " + stopwatch.Elapsed);
}
}

Expand Down

0 comments on commit e8ad01b

Please sign in to comment.