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.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: import java.util.HashMap;
16: import java.util.Map;
17:
18: public class ObjectDataL1ReconnectActivePassiveTest extends
19: TransparentTestBase implements TestConfigurator {
20:
21: private int clientCount = 2;
22:
23: protected Class getApplicationClass() {
24: return ObjectDataTestApp.class;
25: }
26:
27: protected Map getOptionalAttributes() {
28: Map attributes = new HashMap();
29: attributes.put(ObjectDataTestApp.SYNCHRONOUS_WRITE, "true");
30: return attributes;
31: }
32:
33: public void doSetUp(TransparentTestIface t) throws Exception {
34: t.getTransparentAppConfig().setClientCount(clientCount)
35: .setIntensity(1);
36: t.initializeTestRunner();
37: }
38:
39: protected boolean enableL1Reconnect() {
40: return true;
41: }
42:
43: protected boolean canRunActivePassive() {
44: return true;
45: }
46:
47: public void setupActivePassiveTest(
48: ActivePassiveTestSetupManager setupManager) {
49: setupManager.setServerCount(2);
50: setupManager
51: .setServerCrashMode(ActivePassiveCrashMode.CONTINUOUS_ACTIVE_CRASH);
52: setupManager.setServerCrashWaitTimeInSec(30);
53: // leaving this as a disk-based active-passive test just so we have one
54: setupManager
55: .setServerShareDataMode(ActivePassiveSharedDataMode.DISK);
56: setupManager
57: .setServerPersistenceMode(ActivePassivePersistenceMode.PERMANENT_STORE);
58: }
59:
60: }
|