01: /*
02: * All content copyright (c) 2003-2006 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 LinkedHashMapMutateValidateTest extends
14: TransparentTestBase {
15:
16: public static final int MUTATOR_NODE_COUNT = 2;
17: public static final int VALIDATOR_NODE_COUNT = 1;
18: public static final int APP_INSTANCE_PER_NODE = 2;
19: private static final boolean IS_MUTATE_VALIDATE_TEST = true;
20:
21: public void doSetUp(TransparentTestIface t) throws Exception {
22: TransparentAppConfig tac = t.getTransparentAppConfig();
23: tac.setClientCount(MUTATOR_NODE_COUNT).setIntensity(1)
24: .setValidatorCount(VALIDATOR_NODE_COUNT)
25: .setApplicationInstancePerClientCount(
26: APP_INSTANCE_PER_NODE);
27: t.initializeTestRunner(IS_MUTATE_VALIDATE_TEST);
28: }
29:
30: protected Class getApplicationClass() {
31: return LinkedHashMapMutateValidateTestApp.class;
32: }
33:
34: public void setupActivePassiveTest(
35: ActivePassiveTestSetupManager setupManager) {
36: setupManager.setServerCount(2);
37: setupManager
38: .setServerCrashMode(ActivePassiveCrashMode.CRASH_AFTER_MUTATE);
39: setupManager
40: .setServerShareDataMode(ActivePassiveSharedDataMode.NETWORK);
41: setupManager
42: .setServerPersistenceMode(ActivePassivePersistenceMode.TEMPORARY_SWAP_ONLY);
43: }
44:
45: protected boolean canRunActivePassive() {
46: return true;
47: }
48: }
|