Skip to content

Commit

Permalink
MacOS highlights perils of sleps in tests
Browse files Browse the repository at this point in the history
This default changed some time back, but MacOS tends to be the only CI env that highlights it
  • Loading branch information
bartelink committed Jun 5, 2023
1 parent b33b08f commit 91e5596
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/Equinox.Core.Tests/AsyncBatchingGateTests.fs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module Equinox.Core.Tests.AsyncBatchingGateTests

open System
open Equinox.Core
open FsCheck.Xunit
open Swensen.Unquote
Expand All @@ -20,10 +21,10 @@ let ``AsyncBatchingGate correctness`` () = async {
0 =! concurrency
return reqs
}
let cell = AsyncBatchingGate dispatch
let cell = AsyncBatchingGate(dispatch, linger = TimeSpan.FromMilliseconds 5)
let! results = [1 .. 100] |> Seq.map cell.Execute |> Async.Parallel
test <@ set (Seq.collect id results) = set [1 .. 100] @>
// Default linger of 5ms makes this tend strongly to only be 1 batch
// Linger of 5ms makes this tend strongly to only be 1 batch
test <@ batches < 2 @>
}

Expand Down

0 comments on commit 91e5596

Please sign in to comment.