Commit graph

31 commits

Author SHA1 Message Date
Patrik Nordwall
b8b65c9153 Cluster member age, and usage in singleton, see #3195
* Assign internal upNumber when member is moved to Up
* Public API Member.isOlder
* Change cluster singleton to use oldest member instead of leader
* Update samples and docs
2013-05-03 13:38:35 +02:00
Patrik Nordwall
806fc0c525 Use awaitAssert in cluster tests, see #3168 2013-03-25 13:08:06 +01:00
Viktor Klang
adfeb2c1f0 #2879 - updating copyright info 2013-01-09 11:38:00 +01:00
Björn Antonsson
a03460329d Change cluster MemberEvents to only be published on convergence. See #2692
Conflicts:
	akka-cluster/src/main/scala/akka/cluster/ClusterEvent.scala
	akka-cluster/src/main/scala/akka/cluster/ClusterJmx.scala
	akka-cluster/src/main/scala/akka/cluster/ClusterMetricsCollector.scala
	akka-cluster/src/main/scala/akka/cluster/ClusterReadView.scala
	akka-cluster/src/multi-jvm/scala/akka/cluster/MultiNodeClusterSpec.scala
	akka-docs/rst/cluster/cluster-usage-java.rst
	akka-docs/rst/cluster/cluster-usage-scala.rst
	akka-kernel/src/main/dist/bin/akka-cluster
2012-12-14 12:46:13 +01: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
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
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
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
e4104cfd06 Replace 'after' barrier with explicit barrier inside test method.
* It's no problem using after, but scalatest will output the test method
  as completed (green) before running after, so it looks confusing in the logs
* Using unique barrier names adds extra traceability in case of failures.
2012-06-04 11:58:09 +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
4786078565 Adjust cluster tests to not fail when excluded, see 2139 2012-05-27 19:46:42 +02:00
Patrik Nordwall
6993064cde Revert "Commented out the cluster tests because it's not possible to exclude them right now"
This reverts commit 2abe5308da.
2012-05-27 19:21:38 +02:00
Patrik Nordwall
2abe5308da Commented out the cluster tests because it's not possible to exclude them right now 2012-05-25 17:04:53 +02:00
Patrik Nordwall
17d54f1ae8 Tag as LongRunningTest 2012-05-25 15:45:13 +02:00
Patrik Nordwall
829783f359 Remove port awareness in asserts of leader and members. See #2133
* Extracted common parts to MultiNodeClusterSpec
2012-05-25 12:10:37 +02:00
Patrik Nordwall
3aba8dc424 Assert with sorted member addresses, since ports are random 2012-05-25 10:00:30 +02:00
Patrik Nordwall
ed31c1738f Change node naming. See 2115 2012-05-25 08:55:02 +02:00
Patrik Nordwall
ee73090c98 Remove hardcode host/port for node-to-join. See #2115 2012-05-24 16:25:57 +02:00
Patrik Nordwall
d16590f82e Remove node var. See #2115 2012-05-24 15:34:11 +02:00
Patrik Nordwall
ae69c6a975 Changed the stupid node var. See #2115 2012-05-24 12:18:53 +02:00
Patrik Nordwall
dd5a78597a Port NodeMembershipSpec to MultiNodeSpec. See #2115 2012-05-24 12:00:16 +02:00
Patrik Nordwall
33cec55dbe Moved NodeMembershipSpec to multi-jvm. See #2115 2012-05-24 12:00:16 +02:00
Renamed from akka-cluster/src/test/scala/akka/cluster/NodeMembershipSpec.scala (Browse further)