You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My test runner hiccups on Debugger.Break() in tests (not surprisingly, a normal executable would do too). I was wondering if this break is intentional and serves a purpose, or was left their as a remnant of some temporary debugging situation.
Also, the |> ignore is redundant.
The test:
[<Test>]memberthis.StartAsTaskCancellation()=letcts=new CancellationTokenSource()lettcs= TaskCompletionSource<unit>()leta=async{
cts.CancelAfter (100)do! tcs.Task |> Async.AwaitTask }#if FSCORE_PORTABLE_NEW || coreclr
lett:Task<unit>=#elseuse t:Task<unit>=#endif
Async.StartAsTask(a, cancellationToken = cts.Token)// Should not finishtryletresult= t.Wait(300)
Assert.IsFalse (result)with:? AggregateException -> Assert.Fail "Task should not finish, jet"
tcs.SetCanceled()try
this.WaitASec t
with:? AggregateException as a ->match a.InnerException with|:? TaskCanceledException as t ->()|_-> reraise()
System.Diagnostics.Debugger.Break()|> ignore
Assert.IsTrue (t.IsCompleted,"Task is not completed")
I can remove this line if nobody objects.
The text was updated successfully, but these errors were encountered:
abelbraaksma
changed the title
The test StartAsTaskCancellation contains a Debugger.Break(), should this be there or can it be removed?
The test StartAsTaskCancellation contains a Debugger.Break(), can it be removed safely?
Sep 19, 2017
My test runner hiccups on
Debugger.Break()
in tests (not surprisingly, a normal executable would do too). I was wondering if this break is intentional and serves a purpose, or was left their as a remnant of some temporary debugging situation.Also, the
|> ignore
is redundant.The test:
I can remove this line if nobody objects.
The text was updated successfully, but these errors were encountered: