ARTEMIS-269 - sett restartBackup to true by default

https://issues.apache.org/jira/browse/ARTEMIS-269
This commit is contained in:
Andy Taylor 2015-10-20 13:34:02 +01:00
parent 2d3177a45b
commit 31f2389343
3 changed files with 3 additions and 1 deletions

View File

@ -369,7 +369,7 @@ public final class ActiveMQDefaultConfiguration {
private static int DEFAULT_MAX_SAVED_REPLICATED_JOURNALS_SIZE = 2;
// Will this server, if a backup, restart once it has been stopped because of failback or scaling down.
private static boolean DEFAULT_RESTART_BACKUP = false;
private static boolean DEFAULT_RESTART_BACKUP = true;
// Whether a server will automatically stop when another places a request to take over its place. The use case is when a regular server stops and its backup takes over its duties, later the main server restarts and requests the server (the former backup) to stop operating.
private static boolean DEFAULT_ALLOW_AUTO_FAILBACK = true;

View File

@ -192,6 +192,7 @@ public abstract class FailoverTestBase extends ActiveMQTestBase {
protected void setupHAPolicyConfiguration() {
((ReplicaPolicyConfiguration) backupConfig.getHAPolicyConfiguration()).setMaxSavedReplicatedJournalsSize(0).setAllowFailBack(true);
((ReplicaPolicyConfiguration) backupConfig.getHAPolicyConfiguration()).setRestartBackup(false);
}
protected final void adaptLiveConfigForReplicatedFailBack(TestableServer server) {

View File

@ -127,6 +127,7 @@ public class ReplicatedFailoverTest extends FailoverTest {
if (isReplicatedFailbackTest) {
((ReplicatedPolicyConfiguration) liveConfig.getHAPolicyConfiguration()).setCheckForLiveServer(true);
((ReplicaPolicyConfiguration) backupConfig.getHAPolicyConfiguration()).setMaxSavedReplicatedJournalsSize(2).setAllowFailBack(true);
((ReplicaPolicyConfiguration) backupConfig.getHAPolicyConfiguration()).setRestartBackup(false);
}
else {
super.setupHAPolicyConfiguration();