Skip to content

Commit

Permalink
Decrease concurrency/replicas in CallbackStackSpec
Browse files Browse the repository at this point in the history
Co-authored-by: Sam Pillsworth <[email protected]>
  • Loading branch information
armanbilge and samspills committed Jan 15, 2024
1 parent eba766e commit 3e9f22e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ class CallbackStackSpec extends BaseSpec with DetectPlatform {
packed <- IO(stack.pack(1))
} yield (if (removed) 1 else 0) + packed

val concurrency = Math.max(2, Runtime.getRuntime().availableProcessors())

pushClearPack
.parReplicateA(3000)
.parReplicateA(concurrency)
.product(IO(stack.pack(1)))
.flatMap { case (xs, y) => IO((xs.sum + y) mustEqual 3000) }
.flatMap { case (xs, y) => IO((xs.sum + y) mustEqual concurrency) }
.replicateA_(if (isJS || isNative) 1 else 1000)
.as(ok)
}
Expand Down

0 comments on commit 3e9f22e

Please sign in to comment.