diff --git a/akka-stm/src/test/scala/config/ConfigSpec.scala b/akka-stm/src/test/scala/config/ConfigSpec.scala new file mode 100644 index 0000000000..7a50b64f0f --- /dev/null +++ b/akka-stm/src/test/scala/config/ConfigSpec.scala @@ -0,0 +1,35 @@ +/** + * Copyright (C) 2009-2011 Scalable Solutions AB + */ + +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)) + } + } +} diff --git a/config/akka-reference.conf b/config/akka-reference.conf index 5704f48562..114a9918fd 100644 --- a/config/akka-reference.conf +++ b/config/akka-reference.conf @@ -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 + } }