Skip to content

Commit c07c1eb

Browse files
committed
Switch on test timeouts on individual tests, even though it has a warning for parallel running
1 parent a30d0d0 commit c07c1eb

16 files changed

+148
-148
lines changed

src/FSharpy.TaskSeq.Test/TaskSeq.Choose.Tests.fs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ open FsToolkit.ErrorHandling
99

1010
open FSharpy
1111

12-
[<Fact>]
12+
[<Fact(Timeout = 10_000)>]
1313
let ``ZHang timeout test`` () = task {
1414
let! empty = Task.Delay 30
1515

1616
empty |> should be Null
1717
}
1818

19-
[<Fact>]
19+
[<Fact(Timeout = 10_000)>]
2020
let ``TaskSeq-choose on an empty sequence`` () = task {
2121
let! empty =
2222
TaskSeq.empty
@@ -26,7 +26,7 @@ let ``TaskSeq-choose on an empty sequence`` () = task {
2626
List.isEmpty empty |> should be True
2727
}
2828

29-
[<Fact>]
29+
[<Fact(Timeout = 10_000)>]
3030
let ``TaskSeq-chooseAsync on an empty sequence`` () = task {
3131
let! empty =
3232
TaskSeq.empty
@@ -36,7 +36,7 @@ let ``TaskSeq-chooseAsync on an empty sequence`` () = task {
3636
List.isEmpty empty |> should be True
3737
}
3838

39-
[<Fact>]
39+
[<Fact(Timeout = 10_000)>]
4040
let ``TaskSeq-choose can convert and filter`` () = task {
4141
let! alphabet =
4242
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -46,7 +46,7 @@ let ``TaskSeq-choose can convert and filter`` () = task {
4646
String alphabet |> should equal "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
4747
}
4848

49-
[<Fact>]
49+
[<Fact(Timeout = 10_000)>]
5050
let ``TaskSeq-chooseAsync can convert and filter`` () = task {
5151
let! alphabet =
5252
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50

src/FSharpy.TaskSeq.Test/TaskSeq.Collect.Tests.fs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ open FsToolkit.ErrorHandling
66

77
open FSharpy
88

9-
[<Fact>]
9+
[<Fact(Timeout = 10_000)>]
1010
let ``TaskSeq-collect operates in correct order`` () = task {
1111
let! sq =
1212
createDummyTaskSeq 10
@@ -22,7 +22,7 @@ let ``TaskSeq-collect operates in correct order`` () = task {
2222
|> should equal "ABBCCDDEEFFGGHHIIJJK"
2323
}
2424

25-
[<Fact>]
25+
[<Fact(Timeout = 10_000)>]
2626
let ``TaskSeq-collectSeq operates in correct order`` () = task {
2727
let! sq =
2828
createDummyTaskSeq 10
@@ -38,7 +38,7 @@ let ``TaskSeq-collectSeq operates in correct order`` () = task {
3838
|> should equal "ABBCCDDEEFFGGHHIIJJK"
3939
}
4040

41-
[<Fact>]
41+
[<Fact(Timeout = 10_000)>]
4242
let ``TaskSeq-collect with empty task sequences`` () = task {
4343
let! sq =
4444
createDummyTaskSeq 10
@@ -48,7 +48,7 @@ let ``TaskSeq-collect with empty task sequences`` () = task {
4848
Seq.isEmpty sq |> should be True
4949
}
5050

51-
[<Fact>]
51+
[<Fact(Timeout = 10_000)>]
5252
let ``TaskSeq-collectSeq with empty sequences`` () = task {
5353
let! sq =
5454
createDummyTaskSeq 10
@@ -58,7 +58,7 @@ let ``TaskSeq-collectSeq with empty sequences`` () = task {
5858
Seq.isEmpty sq |> should be True
5959
}
6060

61-
[<Fact>]
61+
[<Fact(Timeout = 10_000)>]
6262
let ``TaskSeq-empty is empty`` () = task {
6363
let! sq = TaskSeq.empty<string> |> TaskSeq.toSeqCachedAsync
6464
Seq.isEmpty sq |> should be True

src/FSharpy.TaskSeq.Test/TaskSeq.Filter.Tests.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ open FsToolkit.ErrorHandling
77

88
open FSharpy
99

10-
[<Fact>]
10+
[<Fact(Timeout = 10_000)>]
1111
let ``TaskSeq-filter on an empty sequence`` () = task {
1212
let! empty =
1313
TaskSeq.empty
@@ -17,7 +17,7 @@ let ``TaskSeq-filter on an empty sequence`` () = task {
1717
List.isEmpty empty |> should be True
1818
}
1919

20-
[<Fact>]
20+
[<Fact(Timeout = 10_000)>]
2121
let ``TaskSeq-filterAsync on an empty sequence`` () = task {
2222
let! empty =
2323
TaskSeq.empty
@@ -27,7 +27,7 @@ let ``TaskSeq-filterAsync on an empty sequence`` () = task {
2727
List.isEmpty empty |> should be True
2828
}
2929

30-
[<Fact>]
30+
[<Fact(Timeout = 10_000)>]
3131
let ``TaskSeq-filter filters correctly`` () = task {
3232
let! alphabet =
3333
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -40,7 +40,7 @@ let ``TaskSeq-filter filters correctly`` () = task {
4040
String alphabet |> should equal "Z[\]^_`abcdefghijklmnopqr"
4141
}
4242

43-
[<Fact>]
43+
[<Fact(Timeout = 10_000)>]
4444
let ``TaskSeq-filterAsync filters correctly`` () = task {
4545
let! alphabet =
4646
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50

src/FSharpy.TaskSeq.Test/TaskSeq.Find.Tests.fs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ open System.Collections.Generic
1313
// the tryXXX versions are at the bottom half
1414
//
1515

16-
[<Fact>]
16+
[<Fact(Timeout = 10_000)>]
1717
let ``TaskSeq-find on an empty sequence raises KeyNotFoundException`` () = task {
1818
fun () -> TaskSeq.empty |> TaskSeq.find ((=) 12) |> Task.ignore
1919
|> should throwAsyncExact typeof<KeyNotFoundException>
2020
}
2121

22-
[<Fact>]
22+
[<Fact(Timeout = 10_000)>]
2323
let ``TaskSeq-find on an empty sequence raises KeyNotFoundException - variant`` () = task {
2424
fun () -> taskSeq { do () } |> TaskSeq.find ((=) 12) |> Task.ignore
2525
|> should throwAsyncExact typeof<KeyNotFoundException>
2626
}
2727

28-
[<Fact>]
28+
[<Fact(Timeout = 10_000)>]
2929
let ``TaskSeq-findAsync on an empty sequence raises KeyNotFoundException`` () = task {
3030
fun () ->
3131
TaskSeq.empty
@@ -34,7 +34,7 @@ let ``TaskSeq-findAsync on an empty sequence raises KeyNotFoundException`` () =
3434
|> should throwAsyncExact typeof<KeyNotFoundException>
3535
}
3636

37-
[<Fact>]
37+
[<Fact(Timeout = 10_000)>]
3838
let ``TaskSeq-find sad path raises KeyNotFoundException`` () = task {
3939
fun () ->
4040
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -44,7 +44,7 @@ let ``TaskSeq-find sad path raises KeyNotFoundException`` () = task {
4444
|> should throwAsyncExact typeof<KeyNotFoundException>
4545
}
4646

47-
[<Fact>]
47+
[<Fact(Timeout = 10_000)>]
4848
let ``TaskSeq-findAsync sad path raises KeyNotFoundException`` () = task {
4949
fun () ->
5050
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -54,7 +54,7 @@ let ``TaskSeq-findAsync sad path raises KeyNotFoundException`` () = task {
5454
|> should throwAsyncExact typeof<KeyNotFoundException>
5555
}
5656

57-
[<Fact>]
57+
[<Fact(Timeout = 10_000)>]
5858
let ``TaskSeq-find sad path raises KeyNotFoundException variant`` () = task {
5959
fun () ->
6060
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -64,7 +64,7 @@ let ``TaskSeq-find sad path raises KeyNotFoundException variant`` () = task {
6464
|> should throwAsyncExact typeof<KeyNotFoundException>
6565
}
6666

67-
[<Fact>]
67+
[<Fact(Timeout = 10_000)>]
6868
let ``TaskSeq-findAsync sad path raises KeyNotFoundException variant`` () = task {
6969
fun () ->
7070
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -75,7 +75,7 @@ let ``TaskSeq-findAsync sad path raises KeyNotFoundException variant`` () = task
7575
}
7676

7777

78-
[<Fact>]
78+
[<Fact(Timeout = 10_000)>]
7979
let ``TaskSeq-find happy path middle of seq`` () = task {
8080
let! twentyFive =
8181
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -84,7 +84,7 @@ let ``TaskSeq-find happy path middle of seq`` () = task {
8484
twentyFive |> should equal 25
8585
}
8686

87-
[<Fact>]
87+
[<Fact(Timeout = 10_000)>]
8888
let ``TaskSeq-findAsync happy path middle of seq`` () = task {
8989
let! twentyFive =
9090
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -93,7 +93,7 @@ let ``TaskSeq-findAsync happy path middle of seq`` () = task {
9393
twentyFive |> should equal 25
9494
}
9595

96-
[<Fact>]
96+
[<Fact(Timeout = 10_000)>]
9797
let ``TaskSeq-find happy path first item of seq`` () = task {
9898
let! first =
9999
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -102,7 +102,7 @@ let ``TaskSeq-find happy path first item of seq`` () = task {
102102
first |> should equal 1
103103
}
104104

105-
[<Fact>]
105+
[<Fact(Timeout = 10_000)>]
106106
let ``TaskSeq-findAsync happy path first item of seq`` () = task {
107107
let! first =
108108
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -111,7 +111,7 @@ let ``TaskSeq-findAsync happy path first item of seq`` () = task {
111111
first |> should equal 1
112112
}
113113

114-
[<Fact>]
114+
[<Fact(Timeout = 10_000)>]
115115
let ``TaskSeq-find happy path last item of seq`` () = task {
116116
let! last =
117117
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -120,7 +120,7 @@ let ``TaskSeq-find happy path last item of seq`` () = task {
120120
last |> should equal 50
121121
}
122122

123-
[<Fact>]
123+
[<Fact(Timeout = 10_000)>]
124124
let ``TaskSeq-findAsync happy path last item of seq`` () = task {
125125
let! last =
126126
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -134,13 +134,13 @@ let ``TaskSeq-findAsync happy path last item of seq`` () = task {
134134
// TaskSeq.tryFindAsync
135135
//
136136

137-
[<Fact>]
137+
[<Fact(Timeout = 10_000)>]
138138
let ``TaskSeq-tryFind on an empty sequence returns None`` () = task {
139139
let! nothing = TaskSeq.empty |> TaskSeq.tryFind ((=) 12)
140140
nothing |> should be None'
141141
}
142142

143-
[<Fact>]
143+
[<Fact(Timeout = 10_000)>]
144144
let ``TaskSeq-tryFindAsync on an empty sequence returns None`` () = task {
145145
let! nothing =
146146
TaskSeq.empty
@@ -149,7 +149,7 @@ let ``TaskSeq-tryFindAsync on an empty sequence returns None`` () = task {
149149
nothing |> should be None'
150150
}
151151

152-
[<Fact>]
152+
[<Fact(Timeout = 10_000)>]
153153
let ``TaskSeq-tryFind sad path returns None`` () = task {
154154
let! nothing =
155155
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -158,7 +158,7 @@ let ``TaskSeq-tryFind sad path returns None`` () = task {
158158
nothing |> should be None'
159159
}
160160

161-
[<Fact>]
161+
[<Fact(Timeout = 10_000)>]
162162
let ``TaskSeq-tryFindAsync sad path return None`` () = task {
163163
let! nothing =
164164
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -167,7 +167,7 @@ let ``TaskSeq-tryFindAsync sad path return None`` () = task {
167167
nothing |> should be None'
168168
}
169169

170-
[<Fact>]
170+
[<Fact(Timeout = 10_000)>]
171171
let ``TaskSeq-tryFind sad path returns None variant`` () = task {
172172
let! nothing =
173173
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -176,7 +176,7 @@ let ``TaskSeq-tryFind sad path returns None variant`` () = task {
176176
nothing |> should be None'
177177
}
178178

179-
[<Fact>]
179+
[<Fact(Timeout = 10_000)>]
180180
let ``TaskSeq-tryFindAsync sad path return None - variant`` () = task {
181181
let! nothing =
182182
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -186,7 +186,7 @@ let ``TaskSeq-tryFindAsync sad path return None - variant`` () = task {
186186
}
187187

188188

189-
[<Fact>]
189+
[<Fact(Timeout = 10_000)>]
190190
let ``TaskSeq-tryFind happy path middle of seq`` () = task {
191191
let! twentyFive =
192192
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -196,7 +196,7 @@ let ``TaskSeq-tryFind happy path middle of seq`` () = task {
196196
twentyFive |> should equal (Some 25)
197197
}
198198

199-
[<Fact>]
199+
[<Fact(Timeout = 10_000)>]
200200
let ``TaskSeq-tryFindAsync happy path middle of seq`` () = task {
201201
let! twentyFive =
202202
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -206,7 +206,7 @@ let ``TaskSeq-tryFindAsync happy path middle of seq`` () = task {
206206
twentyFive |> should equal (Some 25)
207207
}
208208

209-
[<Fact>]
209+
[<Fact(Timeout = 10_000)>]
210210
let ``TaskSeq-tryFind happy path first item of seq`` () = task {
211211
let! first =
212212
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -216,7 +216,7 @@ let ``TaskSeq-tryFind happy path first item of seq`` () = task {
216216
first |> should equal (Some 1)
217217
}
218218

219-
[<Fact>]
219+
[<Fact(Timeout = 10_000)>]
220220
let ``TaskSeq-tryFindAsync happy path first item of seq`` () = task {
221221
let! first =
222222
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -226,7 +226,7 @@ let ``TaskSeq-tryFindAsync happy path first item of seq`` () = task {
226226
first |> should equal (Some 1)
227227
}
228228

229-
[<Fact>]
229+
[<Fact(Timeout = 10_000)>]
230230
let ``TaskSeq-tryFind happy path last item of seq`` () = task {
231231
let! last =
232232
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50
@@ -236,7 +236,7 @@ let ``TaskSeq-tryFind happy path last item of seq`` () = task {
236236
last |> should equal (Some 50)
237237
}
238238

239-
[<Fact>]
239+
[<Fact(Timeout = 10_000)>]
240240
let ``TaskSeq-tryFindAsync happy path last item of seq`` () = task {
241241
let! last =
242242
createDummyTaskSeqWith 50L<µs> 1000L<µs> 50

src/FSharpy.TaskSeq.Test/TaskSeq.Fold.Tests.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ open FsToolkit.ErrorHandling
88
open FSharpy
99

1010

11-
[<Fact>]
11+
[<Fact(Timeout = 10_000)>]
1212
let ``TaskSeq-fold folds with every item`` () = task {
1313
let! alphabet =
1414
createDummyTaskSeqWith 50L<µs> 1000L<µs> 26
@@ -18,7 +18,7 @@ let ``TaskSeq-fold folds with every item`` () = task {
1818
|> should equal "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1919
}
2020

21-
[<Fact>]
21+
[<Fact(Timeout = 10_000)>]
2222
let ``TaskSeq-foldAsync folds with every item`` () = task {
2323
let! alphabet =
2424
createDummyTaskSeqWith 50L<µs> 1000L<µs> 26
@@ -30,7 +30,7 @@ let ``TaskSeq-foldAsync folds with every item`` () = task {
3030
|> should equal "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
3131
}
3232

33-
[<Fact>]
33+
[<Fact(Timeout = 10_000)>]
3434
let ``TaskSeq-fold takes state on empty IAsyncEnumberable`` () = task {
3535
let! empty =
3636
TaskSeq.empty
@@ -39,7 +39,7 @@ let ``TaskSeq-fold takes state on empty IAsyncEnumberable`` () = task {
3939
empty |> should equal '_'
4040
}
4141

42-
[<Fact>]
42+
[<Fact(Timeout = 10_000)>]
4343
let ``TaskSeq-foldAsync takes state on empty IAsyncEnumerable`` () = task {
4444
let! alphabet =
4545
TaskSeq.empty

0 commit comments

Comments
 (0)