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.config.schema.setup.TestTVSConfigurationSetupManagerFactory;
08: import com.tc.test.activepassive.ActivePassiveCrashMode;
09: import com.tc.test.activepassive.ActivePassivePersistenceMode;
10: import com.tc.test.activepassive.ActivePassiveSharedDataMode;
11: import com.tc.test.activepassive.ActivePassiveTestSetupManager;
12: import com.terracottatech.config.PersistenceMode;
13:
14: /**
15: * This test makes heavy use of the same TCClass stuff underneath a particular class within a single VM. I'm hoping this // *
16: * test will prove to me that we have a race condition in GenricTCField.[set/get](). If we do, I'll fix it. And then
17: * this test will mostly just be a regression test
18: */
19: public class ConcentratedClassTest extends TransparentTestBase {
20:
21: public static final int NODE_COUNT = 2;
22:
23: public void doSetUp(TransparentTestIface t) throws Exception {
24: t.getTransparentAppConfig().setClientCount(NODE_COUNT)
25: .setIntensity(1);
26: t.initializeTestRunner();
27: }
28:
29: protected void setupConfig(
30: TestTVSConfigurationSetupManagerFactory configFactory) {
31: configFactory.setGCEnabled(true);
32: configFactory.setGCVerbose(true);
33: configFactory
34: .setPersistenceMode(PersistenceMode.TEMPORARY_SWAP_ONLY);
35: }
36:
37: protected Class getApplicationClass() {
38: return ConcentratedClassTestApp.class;
39: }
40:
41: protected boolean canRunCrash() {
42: return true;
43: }
44:
45: protected boolean canRunActivePassive() {
46: return true;
47: }
48:
49: public void setupActivePassiveTest(
50: ActivePassiveTestSetupManager setupManager) {
51: setupManager.setServerCount(2);
52: setupManager
53: .setServerCrashMode(ActivePassiveCrashMode.CONTINUOUS_ACTIVE_CRASH);
54: setupManager.setServerCrashWaitTimeInSec(60);
55: setupManager
56: .setServerShareDataMode(ActivePassiveSharedDataMode.NETWORK);
57: setupManager
58: .setServerPersistenceMode(ActivePassivePersistenceMode.TEMPORARY_SWAP_ONLY);
59: setupManager.setMaxCrashCount(2);
60: }
61:
62: }
|