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