Skip to content

Commit 7686997

Browse files
committed
fix: async tests
1 parent 74d62a7 commit 7686997

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/SwaggerProvider.ProviderTests/v3/Swashbuckle.CancellationToken.Tests.fs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ let ``Call async generated method without CancellationToken uses default token``
6868
let! result = apiAsync.GetApiReturnBoolean()
6969
result |> shouldEqual true
7070
}
71+
|> Async.StartAsTask
7172

7273
[<Fact>]
7374
let ``Call method with required param and explicit CancellationToken``() =
@@ -92,6 +93,7 @@ let ``Call async generated method with explicit CancellationToken``() =
9293
let! result = apiAsync.GetApiReturnInt32(cts.Token)
9394
result |> shouldEqual 42
9495
}
96+
|> Async.StartAsTask
9597

9698
[<Fact>]
9799
let ``Call stream-returning method with explicit CancellationToken``() =
@@ -124,6 +126,7 @@ let ``Call async generated method with already-cancelled token raises OperationC
124126
| :? OperationCanceledException -> ()
125127
| :? AggregateException as aex when (aex.InnerException :? OperationCanceledException) -> ()
126128
}
129+
|> Async.StartAsTask
127130

128131
[<Fact>]
129132
let ``Call async POST generated method with explicit CancellationToken``() =
@@ -132,3 +135,4 @@ let ``Call async POST generated method with explicit CancellationToken``() =
132135
let! result = apiAsync.PostApiReturnString(cts.Token)
133136
result |> shouldEqual "Hello world"
134137
}
138+
|> Async.StartAsTask

0 commit comments

Comments
 (0)