* moved to cluster tests, in new package akka.cluster.testkit * changed config in tests * migration guide * documentation clarificiations for Downing and Leaving * update warnings in Singleton and Sharding
This commit is contained in:
parent
064f06f5a6
commit
a217d5566e
61 changed files with 414 additions and 309 deletions
|
|
@ -22,7 +22,8 @@ object LeaderDowningAllOtherNodesMultiJvmSpec extends MultiNodeConfig {
|
|||
debugConfig(on = false)
|
||||
.withFallback(ConfigFactory.parseString("""
|
||||
akka.cluster.failure-detector.monitored-by-nr-of-members = 2
|
||||
akka.cluster.auto-down-unreachable-after = 1s
|
||||
akka.cluster.downing-provider-class = akka.cluster.testkit.AutoDowning
|
||||
akka.cluster.testkit.auto-down-unreachable-after = 1s
|
||||
"""))
|
||||
.withFallback(MultiNodeClusterSpec.clusterConfig))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,9 @@ final case class LeaderDowningNodeThatIsUnreachableMultiNodeConfig(failureDetect
|
|||
|
||||
commonConfig(
|
||||
debugConfig(on = false)
|
||||
.withFallback(ConfigFactory.parseString("akka.cluster.auto-down-unreachable-after = 2s"))
|
||||
.withFallback(ConfigFactory.parseString("""
|
||||
akka.cluster.downing-provider-class = akka.cluster.testkit.AutoDowning
|
||||
akka.cluster.testkit.auto-down-unreachable-after = 2s"""))
|
||||
.withFallback(MultiNodeClusterSpec.clusterConfig(failureDetectorPuppet)))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,9 @@ object LeaderLeavingMultiJvmSpec extends MultiNodeConfig {
|
|||
|
||||
commonConfig(
|
||||
debugConfig(on = false)
|
||||
.withFallback(ConfigFactory.parseString("akka.cluster.auto-down-unreachable-after = 0s"))
|
||||
.withFallback(ConfigFactory.parseString("""
|
||||
akka.cluster.downing-provider-class = akka.cluster.testkit.AutoDowning
|
||||
akka.cluster.testkit.auto-down-unreachable-after = 0s"""))
|
||||
.withFallback(MultiNodeClusterSpec.clusterConfigWithFailureDetectorPuppet))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@ object MultiDcSplitBrainMultiJvmSpec extends MultiNodeConfig {
|
|||
akka.cluster {
|
||||
gossip-interval = 500ms
|
||||
leader-actions-interval = 1s
|
||||
auto-down-unreachable-after = 1s
|
||||
downing-provider-class = akka.cluster.testkit.AutoDowning
|
||||
testkit.auto-down-unreachable-after = 1s
|
||||
}
|
||||
""")
|
||||
.withFallback(MultiNodeClusterSpec.clusterConfig))
|
||||
|
|
|
|||
|
|
@ -21,8 +21,10 @@ object NodeChurnMultiJvmSpec extends MultiNodeConfig {
|
|||
val third = role("third")
|
||||
|
||||
commonConfig(
|
||||
debugConfig(on = false).withFallback(ConfigFactory.parseString("""
|
||||
akka.cluster.auto-down-unreachable-after = 1s
|
||||
debugConfig(on = false)
|
||||
.withFallback(ConfigFactory.parseString("""
|
||||
akka.cluster.downing-provider-class = akka.cluster.testkit.AutoDowning
|
||||
akka.cluster.testkit.auto-down-unreachable-after = 1s
|
||||
akka.cluster.prune-gossip-tombstones-after = 1s
|
||||
akka.remote.classic.log-frame-size-exceeding = 1200b
|
||||
akka.remote.artery.advanced.aeron {
|
||||
|
|
@ -30,7 +32,8 @@ object NodeChurnMultiJvmSpec extends MultiNodeConfig {
|
|||
embedded-media-driver = off
|
||||
aeron-dir = "target/aeron-NodeChurnSpec"
|
||||
}
|
||||
""")).withFallback(MultiNodeClusterSpec.clusterConfig))
|
||||
"""))
|
||||
.withFallback(MultiNodeClusterSpec.clusterConfig))
|
||||
|
||||
class LogListener(testActor: ActorRef) extends Actor {
|
||||
def receive = {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ object NodeDowningAndBeingRemovedMultiJvmSpec extends MultiNodeConfig {
|
|||
commonConfig(
|
||||
debugConfig(on = false).withFallback(
|
||||
ConfigFactory
|
||||
.parseString("akka.cluster.auto-down-unreachable-after = off")
|
||||
.parseString("akka.cluster.testkit.auto-down-unreachable-after = off")
|
||||
.withFallback(MultiNodeClusterSpec.clusterConfig)))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,10 +21,12 @@ object QuickRestartMultiJvmSpec extends MultiNodeConfig {
|
|||
val third = role("third")
|
||||
|
||||
commonConfig(
|
||||
debugConfig(on = false).withFallback(ConfigFactory.parseString("""
|
||||
akka.cluster.auto-down-unreachable-after = off
|
||||
debugConfig(on = false)
|
||||
.withFallback(ConfigFactory.parseString("""
|
||||
akka.cluster.testkit.auto-down-unreachable-after = off
|
||||
akka.cluster.allow-weakly-up-members = off
|
||||
""")).withFallback(MultiNodeClusterSpec.clusterConfig))
|
||||
"""))
|
||||
.withFallback(MultiNodeClusterSpec.clusterConfig))
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,11 +28,13 @@ object RestartFirstSeedNodeMultiJvmSpec extends MultiNodeConfig {
|
|||
val seed3 = role("seed3")
|
||||
|
||||
commonConfig(
|
||||
debugConfig(on = false).withFallback(ConfigFactory.parseString("""
|
||||
akka.cluster.auto-down-unreachable-after = off
|
||||
debugConfig(on = false)
|
||||
.withFallback(ConfigFactory.parseString("""
|
||||
akka.cluster.testkit.auto-down-unreachable-after = off
|
||||
akka.cluster.retry-unsuccessful-join-after = 3s
|
||||
akka.cluster.allow-weakly-up-members = off
|
||||
""")).withFallback(MultiNodeClusterSpec.clusterConfig))
|
||||
"""))
|
||||
.withFallback(MultiNodeClusterSpec.clusterConfig))
|
||||
}
|
||||
|
||||
class RestartFirstSeedNodeMultiJvmNode1 extends RestartFirstSeedNodeSpec
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@ object RestartNode2SpecMultiJvmSpec extends MultiNodeConfig {
|
|||
commonConfig(
|
||||
debugConfig(on = false)
|
||||
.withFallback(ConfigFactory.parseString("""
|
||||
akka.cluster.auto-down-unreachable-after = 2s
|
||||
akka.cluster.downing-provider-class = akka.cluster.testkit.AutoDowning
|
||||
akka.cluster.testkit.auto-down-unreachable-after = 2s
|
||||
akka.cluster.retry-unsuccessful-join-after = 3s
|
||||
akka.cluster.allow-weakly-up-members = off
|
||||
akka.remote.retry-gate-closed-for = 45s
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ object RestartNode3MultiJvmSpec extends MultiNodeConfig {
|
|||
commonConfig(
|
||||
debugConfig(on = false)
|
||||
.withFallback(ConfigFactory.parseString("""
|
||||
akka.cluster.auto-down-unreachable-after = off
|
||||
akka.cluster.testkit.auto-down-unreachable-after = off
|
||||
akka.cluster.allow-weakly-up-members = off
|
||||
# test is using Java serialization and not priority to rewrite
|
||||
akka.actor.allow-java-serialization = on
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ object RestartNodeMultiJvmSpec extends MultiNodeConfig {
|
|||
commonConfig(
|
||||
debugConfig(on = false)
|
||||
.withFallback(ConfigFactory.parseString("""
|
||||
akka.cluster.auto-down-unreachable-after = 5s
|
||||
akka.cluster.downing-provider-class = akka.cluster.testkit.AutoDowning
|
||||
akka.cluster.testkit.auto-down-unreachable-after = 5s
|
||||
akka.cluster.allow-weakly-up-members = off
|
||||
#akka.remote.use-passive-connections = off
|
||||
# test is using Java serialization and not priority to rewrite
|
||||
|
|
|
|||
|
|
@ -16,12 +16,16 @@ final case class SingletonClusterMultiNodeConfig(failureDetectorPuppet: Boolean)
|
|||
val first = role("first")
|
||||
val second = role("second")
|
||||
|
||||
commonConfig(debugConfig(on = false).withFallback(ConfigFactory.parseString("""
|
||||
commonConfig(
|
||||
debugConfig(on = false)
|
||||
.withFallback(ConfigFactory.parseString("""
|
||||
akka.cluster {
|
||||
auto-down-unreachable-after = 0s
|
||||
downing-provider-class = akka.cluster.testkit.AutoDowning
|
||||
testkit.auto-down-unreachable-after = 0s
|
||||
failure-detector.threshold = 4
|
||||
}
|
||||
""")).withFallback(MultiNodeClusterSpec.clusterConfig(failureDetectorPuppet)))
|
||||
"""))
|
||||
.withFallback(MultiNodeClusterSpec.clusterConfig(failureDetectorPuppet)))
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,12 +21,16 @@ final case class SplitBrainMultiNodeConfig(failureDetectorPuppet: Boolean) exten
|
|||
val fourth = role("fourth")
|
||||
val fifth = role("fifth")
|
||||
|
||||
commonConfig(debugConfig(on = false).withFallback(ConfigFactory.parseString("""
|
||||
commonConfig(
|
||||
debugConfig(on = false)
|
||||
.withFallback(ConfigFactory.parseString("""
|
||||
akka.remote.retry-gate-closed-for = 3 s
|
||||
akka.cluster {
|
||||
auto-down-unreachable-after = 1s
|
||||
downing-provider-class = akka.cluster.testkit.AutoDowning
|
||||
testkit.auto-down-unreachable-after = 1s
|
||||
failure-detector.threshold = 4
|
||||
}""")).withFallback(MultiNodeClusterSpec.clusterConfig(failureDetectorPuppet)))
|
||||
}"""))
|
||||
.withFallback(MultiNodeClusterSpec.clusterConfig(failureDetectorPuppet)))
|
||||
|
||||
testTransport(on = true)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,10 +34,14 @@ object StreamRefSpec extends MultiNodeConfig {
|
|||
val second = role("second")
|
||||
val third = role("third")
|
||||
|
||||
commonConfig(debugConfig(on = false).withFallback(ConfigFactory.parseString("""
|
||||
commonConfig(
|
||||
debugConfig(on = false)
|
||||
.withFallback(ConfigFactory.parseString("""
|
||||
akka.cluster {
|
||||
auto-down-unreachable-after = 1s
|
||||
}""")).withFallback(MultiNodeClusterSpec.clusterConfig))
|
||||
downing-provider-class = akka.cluster.testkit.AutoDowning
|
||||
testkit.auto-down-unreachable-after = 1s
|
||||
}"""))
|
||||
.withFallback(MultiNodeClusterSpec.clusterConfig))
|
||||
|
||||
testTransport(on = true)
|
||||
|
||||
|
|
|
|||
|
|
@ -119,7 +119,8 @@ private[cluster] object StressMultiJvmSpec extends MultiNodeConfig {
|
|||
akka.actor.provider = cluster
|
||||
akka.cluster {
|
||||
failure-detector.acceptable-heartbeat-pause = 10s
|
||||
auto-down-unreachable-after = 1s
|
||||
downing-provider-class = akka.cluster.testkit.AutoDowning
|
||||
testkit.auto-down-unreachable-after = 1s
|
||||
publish-stats-interval = 1s
|
||||
}
|
||||
akka.loggers = ["akka.testkit.TestEventListener"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue