Skip to content

Commit

Permalink
Merge pull request #3952 from armanbilge/topic/callback-stack-spec-le…
Browse files Browse the repository at this point in the history
…ss-replicas

Decrease concurrency/replicas in `CallbackStackSpec`
  • Loading branch information
armanbilge authored Jan 15, 2024
2 parents f1395d7 + 3e9f22e commit 4751662
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 4751662

Please sign in to comment.