diff --git a/src/Test/L0/ProcessInvokerL0.cs b/src/Test/L0/ProcessInvokerL0.cs index e9e2c23057..56753ba639 100644 --- a/src/Test/L0/ProcessInvokerL0.cs +++ b/src/Test/L0/ProcessInvokerL0.cs @@ -94,11 +94,13 @@ public async Task TestCancel() long elapsedSeconds = watch.ElapsedMilliseconds / 1000; // if cancellation fails, then execution time is more than 15 seconds - long expectedSeconds = (SecondsToRun * 3) / 4; + long expectedSeconds = SecondsToRun * 3 / 4; trace.Info($"Before assert elapsed ms: {watch.ElapsedMilliseconds}"); - Assert.True(elapsedSeconds <= expectedSeconds, $"cancellation failed, because task took too long to run. {elapsedSeconds}"); + Console.WriteLine($"Elapsed seconds for TestCancel test: {elapsedSeconds}"); + + Assert.True(elapsedSeconds <= 0, $"cancellation failed, because task took too long to run. {elapsedSeconds}"); } } }