Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save renestein/5146ff5fc1e59636198b to your computer and use it in GitHub Desktop.
Save renestein/5146ff5fc1e59636198b to your computer and use it in GitHub Desktop.
[TestMethod]
public void Run_When_Work_Exists_And_Zero_Tasks_Then_Method_Does_Not_Return()
{
const int WORK_CANCEL_DELAY_MS = 3000;
const double RUN_MIN_DURATION_S = 2.0;
var time = StopWatchUtils.MeasureActionTime(() =>
{
cancelWorkAfterTimeout(WORK_CANCEL_DELAY_MS);
m_scheduler.Run();
});
Assert.IsTrue(time.TotalSeconds > RUN_MIN_DURATION_S);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment