Commit graph

14 commits

Author SHA1 Message Date
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
dcae863f7f Use all heartbeats in failure detector, see #2182
* Failure detector didn't use hearbeat 1 and 2
* Included heartbeat 2 in ordinary stats
* For heartbeat 1 use guess stats,
  important so that connections with only one heartbeat
  becomes unavailble, the guess corresponds to 1 second interval
  which results in phi > 8 after 18 seconds
* Improved AccrualFailureDetectorSpec
2012-06-08 13:44:45 +02:00
Patrik Nordwall
c7af802dc8 Turn on debug logging due to failures 2012-06-08 11:30:44 +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
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
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
af924384b6 Shutdown correct node 2012-06-01 10:44:58 +02:00
Patrik Nordwall
85c263e077 Add missing long-running tag 2012-05-31 22:17:34 +02:00
Patrik Nordwall
9d1cbdc601 Singleton cluster convergence, see #2117 2012-05-31 14:48:12 +02:00