KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tctest > longrunning > LongrunningGCTester


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.longrunning;
5
6 import com.tc.config.schema.SettableConfigItem;
7 import com.tc.config.schema.setup.TestTVSConfigurationSetupManagerFactory;
8 import com.tctest.TestConfigurator;
9 import com.tctest.TransparentTestBase;
10 import com.tctest.TransparentTestIface;
11 import com.terracottatech.config.PersistenceMode;
12
13 public class LongrunningGCTester extends TransparentTestBase implements TestConfigurator {
14
15   int NODE_COUNT = 3;
16   int LOOP_ITERATION_COUNT = 1;
17
18   public void setUp() throws Exception JavaDoc {
19     super.setUp();
20     doSetUp(this);
21   }
22
23   public void doSetUp(TransparentTestIface t) throws Exception JavaDoc {
24     t.getTransparentAppConfig().setClientCount(NODE_COUNT).setIntensity(LOOP_ITERATION_COUNT);
25
26     TestTVSConfigurationSetupManagerFactory factory = (TestTVSConfigurationSetupManagerFactory) t.getConfigFactory();
27
28     ((SettableConfigItem) factory.l2DSOConfig().garbageCollectionEnabled()).setValue(true);
29     ((SettableConfigItem) factory.l2DSOConfig().garbageCollectionVerbose()).setValue(true);
30     ((SettableConfigItem) factory.l2DSOConfig().persistenceMode()).setValue(PersistenceMode.TEMPORARY_SWAP_ONLY);
31
32     t.getRunnerConfig().setExecutionTimeout(Long.MAX_VALUE);
33     t.initializeTestRunner();
34   }
35
36   protected Class JavaDoc getApplicationClass() {
37     return LongrunningGCTestApp.class;
38   }
39
40 }
41
Popular Tags