KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tctest > ConcentratedClassTest


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tctest;
5
6 import com.tc.config.schema.SettableConfigItem;
7 import com.tc.config.schema.setup.TestTVSConfigurationSetupManagerFactory;
8 import com.terracottatech.config.PersistenceMode;
9
10 /**
11  * This test makes heavy use of the same TCClass stuff underneath a particular class within a single VM. I'm hoping this // *
12  * test will prove to me that we have a race condition in GenricTCField.[set/get](). If we do, I'll fix it. And then
13  * this test will mostly just be a regression test
14  */

15 public class ConcentratedClassTest extends TransparentTestBase {
16
17   public static final int NODE_COUNT = 2;
18
19   public void doSetUp(TransparentTestIface t) throws Exception JavaDoc {
20     t.getTransparentAppConfig().setClientCount(NODE_COUNT).setIntensity(1);
21
22     TestTVSConfigurationSetupManagerFactory factory = (TestTVSConfigurationSetupManagerFactory) t.getConfigFactory();
23
24     ((SettableConfigItem) factory.l2DSOConfig().garbageCollectionEnabled()).setValue(true);
25     ((SettableConfigItem) factory.l2DSOConfig().garbageCollectionVerbose()).setValue(true);
26     ((SettableConfigItem) factory.l2DSOConfig().persistenceMode()).setValue(PersistenceMode.TEMPORARY_SWAP_ONLY);
27
28     t.initializeTestRunner();
29   }
30
31   protected Class JavaDoc getApplicationClass() {
32     return ConcentratedClassTestApp.class;
33   }
34
35   protected boolean getStartServer() {
36     return true;
37   }
38   
39   protected boolean canRunCrash() {
40     return true;
41   }
42
43 }
Popular Tags