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 ReentrantReadWriteLockCrashTest extends
14: TransparentTestBase {
15:
16: private static final int NODE_COUNT = 3;
17:
18: public void doSetUp(TransparentTestIface t) throws Exception {
19: TransparentAppConfig appConfig = t.getTransparentAppConfig();
20: appConfig.setClientCount(NODE_COUNT);
21: t.initializeTestRunner();
22: appConfig.setAttribute(
23: ReentrantReadWriteLockTestApp.CRASH_TEST, "true");
24: }
25:
26: protected Class getApplicationClass() {
27: return ReentrantReadWriteLockTestApp.class;
28: }
29:
30: protected boolean canRunCrash() {
31: return true;
32: }
33:
34: protected boolean canRunActivePassive() {
35: return true;
36: }
37:
38: public void setupActivePassiveTest(
39: ActivePassiveTestSetupManager setupManager) {
40: setupManager.setServerCount(2);
41: setupManager
42: .setServerCrashMode(ActivePassiveCrashMode.CONTINUOUS_ACTIVE_CRASH);
43: setupManager.setServerCrashWaitTimeInSec(30);
44: setupManager
45: .setServerShareDataMode(ActivePassiveSharedDataMode.NETWORK);
46: setupManager
47: .setServerPersistenceMode(ActivePassivePersistenceMode.TEMPORARY_SWAP_ONLY);
48: }
49:
50: }
|