re #689: Verified config for akka-stm.

This commit is contained in:
Heiko Seeberger 2011-03-08 06:02:13 +01:00 committed by Viktor Klang
parent 95c2b0446e
commit ebc8ccba84
2 changed files with 40 additions and 1 deletions

View file

@ -0,0 +1,35 @@
/**
* Copyright (C) 2009-2011 Scalable Solutions AB <http://scalablesolutions.se>
*/
package akka.config
import org.junit.runner.RunWith
import org.scalatest.WordSpec
import org.scalatest.junit.JUnitRunner
import org.scalatest.matchers.MustMatchers
@RunWith(classOf[JUnitRunner])
class ConfigSpec extends WordSpec with MustMatchers {
"The default configuration file (i.e. akka-reference.conf)" should {
"contain all configuration properties for akka-stm that are used in code with their correct defaults" in {
import Config.config._
getInt("akka.storage.max-retries") must equal(Some(10))
getBool("akka.stm.blocking-allowed") must equal(Some(false))
getBool("akka.stm.fair") must equal(Some(true))
getBool("akka.stm.hooks") must equal(Some(true))
getBool("akka.stm.interruptible") must equal(Some(false))
getBool("akka.stm.jta-aware") must equal(Some(false))
getInt("akka.stm.max-retries") must equal(Some(1000))
getString("akka.stm.propagation") must equal(Some("requires"))
getBool("akka.stm.quick-release") must equal(Some(true))
getBool("akka.stm.speculative") must equal(Some(true))
getLong("akka.stm.timeout") must equal(Some(10))
getString("akka.stm.trace-level") must equal(Some("none"))
getBool("akka.stm.write-skew") must equal(Some(true))
}
}
}

View file

@ -61,7 +61,7 @@ akka {
stm {
fair = on # Should global transactions be fair or non-fair (non fair yield better performance)
max-retries = 1000
timeout = 5 # Default timeout for blocking transactions and transaction set (in unit defined by
timeout = 10 # Default timeout for blocking transactions and transaction set (in unit defined by
# the time-unit property)
write-skew = true
blocking-allowed = false
@ -156,4 +156,8 @@ akka {
service = off
}
}
storage {
max-retries = 10
}
}