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 ObjectDataSynchronousWriteL1ReconnectTest 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 canRunCrash() {
40: return true;
41: }
42:
43: protected boolean canRunActivePassive() {
44: return true;
45: }
46:
47: protected boolean enableL1Reconnect() {
48: return true;
49: }
50:
51: public void setupActivePassiveTest(
52: ActivePassiveTestSetupManager setupManager) {
53: setupManager.setServerCount(2);
54: setupManager
55: .setServerCrashMode(ActivePassiveCrashMode.CONTINUOUS_ACTIVE_CRASH);
56: setupManager.setServerCrashWaitTimeInSec(30);
57: // leaving this as a disk-based active-passive test just so we have one
58: setupManager
59: .setServerShareDataMode(ActivePassiveSharedDataMode.DISK);
60: setupManager
61: .setServerPersistenceMode(ActivePassivePersistenceMode.PERMANENT_STORE);
62: }
63:
64: }
|