Commit graph

51 commits

Author SHA1 Message Date
Roland
35b7a9e338 second round of FiniteDuration business, including cluster fixes
- make Scheduler only accept FiniteDuration, which has quite some
  knock-on effects
2012-09-18 09:58:30 +02:00
Björn Antonsson
afe30e9038 Removed all dependencies to ScalaTest in the published artifacts. See #1802 2012-09-12 15:12:13 +02:00
Patrik Nordwall
018a949678 Merge branch 'master' into wip-2103-cluster-routers-patriknw
Conflicts:
	akka-cluster/src/multi-jvm/scala/akka/cluster/ClientDowningNodeThatIsUnreachableSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/ClientDowningNodeThatIsUpSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/ConvergenceSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/LeaderDowningNodeThatIsUnreachableSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/LeaderElectionSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/MultiNodeClusterSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/SingletonClusterSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/SplitBrainSpec.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/UnreachableNodeRejoinsClusterSpec.scala
	akka-cluster/src/test/scala/akka/cluster/ClusterSpec.scala
	akka-remote/src/main/scala/akka/routing/RemoteRouterConfig.scala
2012-09-11 10:55:47 +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
f4cc8f8649 Make it more intuitive for tests using real Cluster(system) extension, see #2103
* We will write more tests that rely on real Cluster(system) extension,
  such as ClusterRoundRobinRoutedActorSpec
* When not using FailureDetectorStrategy or overriding seed nodes
  MultiNodeClusterSpec will use the real Cluster(system) extension
  instead of a new Cluster instance with additional test facilities
2012-08-28 16:38:05 +02:00
Patrik Nordwall
417bdc2dfb Prototype of cluster aware routers, see #2103
* Several FIXME that needs to be discussed
* ClusterRouterConfig created via ClusterActorRefProvider
2012-08-28 11:54:52 +02:00
Patrik Nordwall
1700edb863 Merge branch 'master' into wip-2202-cluster-domain-events-patriknw
Conflicts:
	akka-cluster/src/main/scala/akka/cluster/ClusterDaemon.scala
2012-08-16 18:54:10 +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
06f81f4373 Improve publish of domain events, see #2202
* Gossip is not exposed in user api
* Better and more events
* Snapshot event sent to new subscriber
* Updated tests
* Periodic publish only for internal stats
2012-08-15 16:47:34 +02:00
Patrik Nordwall
d7b0089d7e Support concurrent startup of seed nodes, see #2270
* Implemented the startup sequence of seed nodes as
  described in #2305
* Test that verifies concurrent startup of seed nodes
2012-08-14 15:16:23 +02:00
Viktor Klang
1114da2198 Importing language features used by akka-cluster and akka-remote-tests 2012-07-26 14:47:21 +02:00
Viktor Klang
ac5b5de90a Merging in master, huge work trying to get things to compile, tests not green at this stage 2012-07-06 17:04:04 +02:00
Patrik Nordwall
c708d2ad8a First step in refactoring of cluster internals to actors, see #2311
* Move clustering code to ClusterCore actor
* More will be done, comitting this for early review
2012-07-04 13:52:14 +02:00
Viktor Klang
54a3a44bf8 #2292 - Removing akka.util.Duration etc and replace it with scala.concurrent.util.Duration 2012-06-29 13:33:20 +02:00
Björn Antonsson
db1175e1f3 Bringing UnreachableNodeRejoinsClusterSpec up to speed with master 2012-06-29 13:24:46 +02:00
Björn Antonsson
2ea0bba9e9 Cluster node that is UNREACHABLE and rejoins. see #2160 2012-06-29 13:24:46 +02:00
Patrik Nordwall
932ea6f98a Test split brain scenario, see #2265 2012-06-26 18:25:42 +02:00
Patrik Nordwall
25996bf284 Join seed nodes before becoming singleton cluster, see #2267
* self is initially not member (in gossip state)
* if the join to seed nodes timeout it joins itself, and becomes
  singleton cluster
* remove the special case handling of singelton cluster in gossip
  merge, since singleton cluster is not the normal state when joining
  any more
2012-06-25 21:34:14 +02:00
Patrik Nordwall
42078e7083 Reintroduce 'seed' nodes, see #2219
* Implement the join to seed nodes process
  When a new node is started started it sends a message to all
  seed nodes and then sends join command to the one that answers
  first.
* Configuration of seed-nodes and auto-join
* New JoinSeedNodeSpec that verifies the auto join to seed nodes
* In tests seed nodes are configured by overriding seedNodes
  function, since addresses are not known before start
* Deputy nodes are the live members of the seed nodes (not sure if
  that will be the final solution, see ticket 2252
* Updated cluster.rst with latest info about deputy and seed nodes
2012-06-21 11:05:02 +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
Björn Antonsson
4a56f195fc Merge branch 'master' into wip-2218-test-conductor-barrier-timeouts 2012-06-19 15:11:50 +02:00
Patrik Nordwall
12e90a98dc Remove address vals in tests, fix race in TransitionSpec, see #2201 2012-06-18 13:24:46 +02:00
Patrik Nordwall
fb04786072 Cleanup based on review comments, see #2201 2012-06-18 11:16:30 +02:00
Patrik Nordwall
aae8869390 Merge branch 'master' into wip-2201-cache-node-lookup-patriknw
Conflicts:
	akka-cluster/src/multi-jvm/scala/akka/cluster/MultiNodeClusterSpec.scala
2012-06-15 17:44:26 +02:00
Patrik Nordwall
f8b7189885 Place the address cache in MultiNodeClusterSpec, see #2201 2012-06-15 17:32:40 +02:00
Patrik Nordwall
404fa4dfa3 Implicit conversion from RoleName to Address
* Improved readability in tests if role name can be used
* Will change other tests also if you like it, otherwise revert
2012-06-15 14:45:41 +02:00
Björn Antonsson
fd42c3d49a Allow barrier timeouts to be shortened and other review fixes 2012-06-15 14:39:47 +02:00
Patrik Nordwall
11c85b84b9 Fail fast in cluster tests if prevous step failed 2012-06-15 13:35:52 +02:00
Björn Antonsson
5714d8327f Make multi node tests use the within() aware barrier 2012-06-13 14:55:33 +02:00
Patrik Nordwall
a7d2be10eb Merge branch 'master' into wip-2214-heartbeats-patriknw
Conflicts:
	akka-cluster/src/main/scala/akka/cluster/AccrualFailureDetector.scala
	akka-cluster/src/main/scala/akka/cluster/Cluster.scala
2012-06-11 22:27:08 +02:00
Patrik Nordwall
e2551494c4 Use Use separate heartbeats for FailureDetector, see #2214
* Send Heartbeat message to all members at regular interval
* Removed the need to gossip to myself
2012-06-11 15:00:44 +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
bc289df018 Unit tests of Cluster, see 2163
* ClusterSpec
- Test gossiping rules for deputies and unreachable
- Fix strange/wrong probabilites for gossip to unreachable and deputy nodes
- Fix lost order of Members when using map (without .toSeq) on the members SortedSet

* MemberSpec
- Test equals, hashCode

* GossipSpec
- Test member merge by status prio
- Fix bug in member merge (groupBy was wrong)
2012-06-07 08:29:07 +02:00
Patrik Nordwall
ac98dddfe8 ScalaDoc of awaitClusterUp 2012-06-05 15:53:30 +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
patriknw
ce332a9f96 Merge pull request #505 from akka/wip-2164-convergence-patriknw
Test gossip convergence, see #2164
2012-06-04 06:16:34 -07:00
Patrik Nordwall
33f14f9bf6 Test gossip convergence, see #2164 2012-06-01 15:15:53 +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
e469561543 Minor corrections and cleanup 2012-05-30 17:17:09 +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
1b20760583 Merge branch 'master' into wip-2112-leader-downing-spec-jboner
Conflicts:
	akka-cluster/src/multi-jvm/scala/akka/cluster/MultiNodeClusterSpec.scala
2012-05-28 14:39:36 +02:00
Patrik Nordwall
c63a28f39a Merge branch 'master' into wip-2109-port-cluster-test-jboner
Conflicts:
	akka-cluster/src/multi-jvm/scala/akka/cluster/MultiNodeClusterSpec.scala
2012-05-28 14:15:44 +02:00
Jonas Bonér
faed944590 Fixed minor check: checking on 'address' equality instead of 'port' 2012-05-28 11:54:10 +02:00
Jonas Bonér
203e2cb13c Added LeaderDowning spec for testing that the leader automatically is downing an unreachable node. Fixes 2112.
- tests downing a node at the end of the node ring
- tests downing a node in the middle of the node ring
- added some more utility stuff to the MultiNodeClusterSpec

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-05-28 11:06:02 +02:00
Jonas Bonér
5080624390 Incorporated feedback - switched to MultiNodeClusterSpec etc. 2012-05-27 21:22:30 +02:00
Patrik Nordwall
597271052f Port LeaderElectionSpec to MultiNodeSpec. See #2113 2012-05-27 10:00:23 +02:00