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