Tweaking the consistency spec for using more cores

This commit is contained in:
Viktor Klang 2011-12-01 17:02:30 +01:00
parent e590a4877a
commit e3e694d1dc

View file

@ -35,10 +35,11 @@ class ConsistencySpec extends AkkaSpec {
import ConsistencySpec._
"The Akka actor model implementation" must {
"provide memory consistency" in {
val noOfActors = 7
val dispatcher = system
.dispatcherFactory
.newDispatcher("consistency-dispatcher", 1, UnboundedMailbox())
.withNewThreadPoolWithArrayBlockingQueueWithCapacityAndFairness(1000, true)
.withNewThreadPoolWithArrayBlockingQueueWithCapacityAndFairness(noOfActors, true)
.setCorePoolSize(10)
.setMaxPoolSize(10)
.setKeepAliveTimeInMillis(1)
@ -46,9 +47,9 @@ class ConsistencySpec extends AkkaSpec {
.build
val props = Props[ConsistencyCheckingActor].withDispatcher(dispatcher)
val actors = Vector.fill(3)(system.actorOf(props))
val actors = Vector.fill(noOfActors)(system.actorOf(props))
for (i 0L until 1000000L) {
for (i 0L until 600000L) {
actors.foreach(_.tell(i, testActor))
}