01: /*
02: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tctest;
05:
06: import com.tc.test.activepassive.ActivePassiveCrashMode;
07: import com.tc.test.activepassive.ActivePassivePersistenceMode;
08: import com.tc.test.activepassive.ActivePassiveSharedDataMode;
09: import com.tc.test.activepassive.ActivePassiveTestSetupManager;
10: import com.tctest.runner.TransparentAppConfig;
11:
12: public class StackMutateValidateTest extends TransparentTestBase {
13:
14: public static final int MUTATOR_NODE_COUNT = 2;
15: public static final int VALIDATOR_NODE_COUNT = 1;
16: public static final int APP_INSTANCE_PER_NODE = 1;
17: private static final boolean IS_MUTATE_VALIDATE_TEST = true;
18:
19: public void doSetUp(TransparentTestIface t) throws Exception {
20: TransparentAppConfig tac = t.getTransparentAppConfig();
21: tac.setClientCount(MUTATOR_NODE_COUNT).setIntensity(1)
22: .setValidatorCount(VALIDATOR_NODE_COUNT)
23: .setApplicationInstancePerClientCount(
24: APP_INSTANCE_PER_NODE);
25: t.initializeTestRunner(IS_MUTATE_VALIDATE_TEST);
26: }
27:
28: protected Class getApplicationClass() {
29: return StackMutateValidateTestApp.class;
30: }
31:
32: public void setupActivePassiveTest(
33: ActivePassiveTestSetupManager setupManager) {
34: setupManager.setServerCount(2);
35: setupManager
36: .setServerCrashMode(ActivePassiveCrashMode.CRASH_AFTER_MUTATE);
37: setupManager
38: .setServerShareDataMode(ActivePassiveSharedDataMode.NETWORK);
39: setupManager
40: .setServerPersistenceMode(ActivePassivePersistenceMode.TEMPORARY_SWAP_ONLY);
41: }
42:
43: protected boolean canRunActivePassive() {
44: return true;
45: }
46:
47: }
|