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.restart.system;
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.TestConfigurator;
12: import com.tctest.TransparentTestBase;
13: import com.tctest.TransparentTestIface;
14:
15: public class ObjectDataRandomCrashTest extends TransparentTestBase
16: implements TestConfigurator {
17:
18: private int clientCount = 2;
19:
20: protected Class getApplicationClass() {
21: return ObjectDataTestApp.class;
22: }
23:
24: public void doSetUp(TransparentTestIface t) throws Exception {
25: t.getTransparentAppConfig().setClientCount(clientCount)
26: .setIntensity(1);
27: t.initializeTestRunner();
28: }
29:
30: protected boolean canRunActivePassive() {
31: return true;
32: }
33:
34: public void setupActivePassiveTest(
35: ActivePassiveTestSetupManager setupManager) {
36: setupManager.setServerCount(3);
37: setupManager
38: .setServerCrashMode(ActivePassiveCrashMode.RANDOM_SERVER_CRASH);
39: setupManager.setServerCrashWaitTimeInSec(20);
40: setupManager
41: .setServerShareDataMode(ActivePassiveSharedDataMode.NETWORK);
42: setupManager
43: .setServerPersistenceMode(ActivePassivePersistenceMode.TEMPORARY_SWAP_ONLY);
44: }
45: }
|