Commit graph

30 commits

Author SHA1 Message Date
Patrik Nordwall
8b4e903e7d Detect failure when no heartbeats sent, see #2907
* Subscribe to InstantMemberEvent and start heartbeating when
  InstantMemberUp. Same for metrics.
* HeartbeatNodeRing data structure for bidirectional mapping of
  heartbeat sender and receiver. Not using ConsistentHash anymore.
  Node addresses are hashed to ensure that neighbors are spread out.
* HeartbeatRequest when receiver detects that it has not received
  expected heartbeats.
* New test InitialHeartbeatSpec that simulates the problem
* Add/remove some related conf properties
* Add some more logging to be able to diagnose eventual problems
* Explicit config of nr-of-end-heartbeats
2013-01-18 12:54:09 +01:00
Viktor Klang
adfeb2c1f0 #2879 - updating copyright info 2013-01-09 11:38:00 +01:00
Viktor Klang
8f131c680f Switching to immutable.Seq instead of Seq 2012-11-12 14:17:47 +01:00
Patrik Nordwall
5e83df74e9 Solve wrong barrier problem, see #2583
* The problem was that we didn't wait for the testconductor.shutdown Future
  to complete and therefore barriers could be triggered in unexpected order.
  The reason why we didn't await, was that during shutdown the Future was
  completed with client disconnected failure. I have fixed that and added
  await to all shutdowns.
2012-10-16 17:02:13 +02:00
Roland
bff79c2f94 Merge remote-tracking branch 'origin/master' into wip-2.10.0-RC1-∂π
- currently cheating: uses zeroMQ artifacts for scala 2.10M7
- fixed a bunch of more wrong references to scala.concurrent.util
2012-10-15 16:18:52 +02:00
Patrik Nordwall
91f6c5a94d Adjust barriers/checks in LeaderElectionSpec, see #2583
* Previously it didn't check for unreachable, before down
2012-10-12 13:27:59 +02:00
Patrik Nordwall
6f70624ddd Diagnostics for failing test, see #2583 2012-10-10 16:45:58 +02:00
Patrik Nordwall
bd6c39178c Fix leaking this in constructor of Cluster, see #2473
* Major refactoring to remove the need to use special
  Cluster instance for testing. Use default Cluster
  extension instead. Most of it is trivial changes.
* Used failure-detector.implementation-class from config
  to swap to Puppet
* Removed FailureDetectorStrategy, since it doesn't add any value
* Added Cluster.joinSeedNodes to be able to test seedNodes when Addresses
  are unknown before startup time.
* Removed ClusterEnvironment that was passed around among the actors,
  instead they use the ordinary Cluster extension.
* Overall much cleaner design
2012-09-06 21:48:40 +02:00
Patrik Nordwall
4e2d7b0495 Move Cluster query methods to ClusterReadView, see #2202
* Better separation of concerns
* Internal API (could be made public if requested)
2012-08-16 18:28:01 +02:00
Patrik Nordwall
063c260615 Add missing after barriers in LeaderElectionSpec, see #2256 2012-06-20 13:30:30 +02:00
Patrik Nordwall
ec9abb12df Merge branch 'master' into wip-2201-cache-node-lookup-patriknw
Conflicts:
	akka-cluster/src/multi-jvm/scala/akka/cluster/ConvergenceSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/LeaderElectionSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/MembershipChangeListenerExitingSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/MembershipChangeListenerJoinSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/MembershipChangeListenerLeavingSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/MembershipChangeListenerUpSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/NodeLeavingAndExitingAndBeingRemovedSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/TransitionSpec.scala
2012-06-20 09:40:16 +02:00
Patrik Nordwall
12e90a98dc Remove address vals in tests, fix race in TransitionSpec, see #2201 2012-06-18 13:24:46 +02:00
Björn Antonsson
fd42c3d49a Allow barrier timeouts to be shortened and other review fixes 2012-06-15 14:39:47 +02:00
Björn Antonsson
5714d8327f Make multi node tests use the within() aware barrier 2012-06-13 14:55:33 +02:00
Jonas Bonér
2dcceb58ce Split up all tests that are related to failure detection into two versions: Accrual FD and FD Puppet. Also moved all tests that are not failure detection tests to use FD Puppet.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-06-11 16:48:19 +02:00
Jonas Bonér
b65cf5c2ec Created FailureDetectorStrategy with two implementations: FailureDetectorPuppetStrategy and AccrualFailureDetectorStrategy.
- Created FailureDetectorStrategy base trait.
- Created FailureDetectorPuppetStrategy.
- Created AccrualFailureDetectorStrategy.
- Created two versions of LeaderDowningNodeThatIsUnreachableMultiJvmSpec
    - LeaderDowningNodeThatIsUnreachableWithFailureDetectorPuppet
    - LeaderDowningNodeThatIsUnreachableWithAccrualFailureDetector
- Added AccrualFailureDetectorStrategy to all the remaining tests - will be split up into two versions shortly.

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-06-11 14:32:17 +02:00
Patrik Nordwall
56735477b8 initialParticipants default as roles.size in cluster tests 2012-06-08 09:23:36 +02:00
Patrik Nordwall
f02793ebd6 Refactor cluster startup join in tests and fix barrier race
* Refactored common code to MultiNodeClusterSpec.awaitClusterUp
* Fixed some race conditions of barriers
2012-06-05 14:17:07 +02:00
Jonas Bonér
4acee03195 Merge branch 'master' into wip-2162-membership-change-listener-spec-jboner
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-06-04 23:32:27 +02:00
Jonas Bonér
391fed6594 Misc changes, fixes and improvements after review.
- Renamed all 'frequency' to 'interval'
- Split up NodeJoinAndUpSpec and into NodeJoinSpec and NodeUpSpec.
- Split up MembershipChangeListenerJoinAndUpSpec and into MembershipChangeListenerJoinSpec and MembershipChangeListenerUpSpec.
- Added utility method 'startClusterNode()'
- Fixed race in register listener and telling node to leave
- Removed 'after' blocks
- Cleaned up unused code
- Improved comments

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-06-04 23:21:28 +02:00
Patrik Nordwall
f30a1a0b1f Always removeNode when shutdown, see 2137 2012-06-04 14:29:32 +02:00
Patrik Nordwall
52f122107c Fix shutdown/remove race as described by @rkuhn, see #2137
* Skip nodes removal
* Ignore removed client when enter barrier
* Change order of testConductor.shutdown and testConductor.removeNode
2012-06-04 11:48:03 +02:00
Patrik Nordwall
4dbf4a70b3 Test leader member states, see 2157
* The only allowed member states for a leader are up or leaving
* Added above check in assertLeader so that we always verify that
* More usage of assertLeader in the tests
2012-06-01 11:39:51 +02:00
Patrik Nordwall
d8530811c9 Minor cleanup 2012-05-28 15:45:21 +02:00
Patrik Nordwall
24212f14bc Rename mySelf in MultiNodeSpec to myself 2012-05-28 15:29:00 +02:00
Patrik Nordwall
59dd754819 Use only the hard exit LeaderElectionSpec, see #2113 2012-05-28 13:55:22 +02:00
Patrik Nordwall
e3eec7e344 LeaderElectionSpec with hard exits. See #2113 and #2138 2012-05-28 11:05:02 +02:00
Patrik Nordwall
a44bd10fc3 Tag as LongRunningTest. See 2113 2012-05-27 19:15:31 +02:00
Patrik Nordwall
597271052f Port LeaderElectionSpec to MultiNodeSpec. See #2113 2012-05-27 10:00:23 +02:00
Patrik Nordwall
57313cc9e0 Move LeaderElectionSpec to multi-jvm. See #2113 2012-05-27 10:00:23 +02:00
Renamed from akka-cluster/src/test/scala/akka/cluster/LeaderElectionSpec.scala (Browse further)