KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > management > PropertyKeys


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise.management;
24
25 import java.util.Map JavaDoc;
26 import java.util.HashMap JavaDoc;
27
28 /**
29     Property keys used to configure the unit tests.
30     
31     @see TestMain
32     @see TestRunner
33  */

34 public final class PropertyKeys
35 {
36     private PropertyKeys() {}
37     
38     
39     private final static String JavaDoc BASE = "amxtest";
40     public static final String JavaDoc DEFAULT_PROPERTIES_FILE = BASE + ".properties";
41
42     public static final String JavaDoc CONNECT_KEY = BASE + ".connect";
43     public static final String JavaDoc HOST_KEY = CONNECT_KEY + ".host";
44     public static final String JavaDoc PORT_KEY = CONNECT_KEY + ".port";
45     public static final String JavaDoc USER_KEY = CONNECT_KEY + ".user";
46     public static final String JavaDoc PASSWORD_KEY = CONNECT_KEY + ".password";
47     public static final String JavaDoc TRUSTSTORE_KEY = CONNECT_KEY + ".truststore";
48     public static final String JavaDoc TRUSTSTORE_PASSWORD_KEY = CONNECT_KEY + ".truststorePassword";
49     public static final String JavaDoc USE_TLS_KEY = CONNECT_KEY + ".useTLS";
50     public static final String JavaDoc RUN_THREADED_KEY = BASE + ".threaded";
51     public static final String JavaDoc VERBOSE_KEY = BASE + ".verbose";
52     public static final String JavaDoc ITERATIONS_KEY = BASE + ".iterations";
53     
54     /**
55         Whether testing is for offline config utilizing
56         com.sun.appserv.management.config.OfflineConfigIniter.
57         You must also supply a value for the {@link #DOMAIN_XML_KEY}.
58      */

59     public static final String JavaDoc TEST_OFFLINE_KEY = BASE + ".testOffline";
60     
61     /**
62         A valid file path for domain.xml.
63      */

64     public static final String JavaDoc DOMAIN_XML_KEY = TEST_OFFLINE_KEY + ".domainXML";
65     
66     
67     /**
68         A boolean specifying whether expanded testing is to be used. When specified,
69         tests that involve clusters, multiple standalone servers, etc are run
70         (if possible).
71      */

72     public static final String JavaDoc EXPANDED_TESTING_KEY = BASE + ".expandedTesting";
73     
74     /**
75         Comma-separated list of node-agent names to be used during testing.
76         The special name {@link #ALL_NODE_AGENTS} may be used to specify all configured node agents.
77         <p>
78         At runtime, the environment contains a Map<String,AppserverConnectionSource> available
79         via this key, where the key is the node agent name.
80      */

81     public static final String JavaDoc NODE_AGENTS_KEY = BASE + ".nodeAgents";
82     
83     public static final String JavaDoc ALL_NODE_AGENTS = "ALL";
84     
85     
86     /**
87         Name of the node agent that the DAS uses.
88      */

89     public static final String JavaDoc DAS_NODE_AGENT_NAME = BASE + ".dasNodeAgent";
90     
91     /**
92         Comma-separated list of files.
93      */

94     public static final String JavaDoc ARCHIVES_TO_DEPLOY_KEY = BASE + ".deploy.files";
95     /**
96         Delimiter between files contained in the value for {@link #ARCHIVES_TO_DEPLOY_KEY}.
97      */

98     public static final String JavaDoc ARCHIVES_DELIM = ",";
99     
100     /**
101         The number of threads to run for DeploymentMgrTest.testDeployHeavilyThreaded()
102      */

103     public static final String JavaDoc DEPLOY_NUM_THREADS = BASE + ".deploy.numThreads";
104     
105     
106     /**
107         The number of threads to run for UploadDownloadMgrTest.testHeavilyThreaded()
108      */

109     public static final String JavaDoc UPLOAD_DOWNLOAD_MGR_TEST_THREADS = BASE + ".UploadDownloadMgrTest.numThreads";
110     /**
111         The size, in KB, of UploadDownloadMgrTest.testDownloadBigFile()
112      */

113     public static final String JavaDoc UPLOAD_DOWNLOAD_MGR_TEST_BIG_FILE_KB = BASE + ".UploadDownloadMgrTest.bigFileKB";
114      
115      
116     
117     /**
118         File consisting of names of tests, one per line
119      */

120     public static final String JavaDoc TEST_CLASSES_FILE_KEY = BASE + ".testClasses";
121     
122     public static final String JavaDoc DEFAULT_HOST = "localhost";
123     public static final String JavaDoc DEFAULT_PORT = "8686";
124     public static final String JavaDoc DEFAULT_USER = "admin";
125     public static final String JavaDoc DEFAULT_PASSWORD = "admin123";
126     public static final String JavaDoc DEFAULT_TRUSTSTORE = "~/" + BASE + ".truststore";
127     public static final String JavaDoc DEFAULT_TRUSTSTORE_PASSWORD = "changeme";
128     public static final String JavaDoc DEFAULT_USE_TLS = "true";
129     public static final String JavaDoc DEFAULT_RUN_THREADED = "true";
130     public static final String JavaDoc DEFAULT_TEST_CLASSES_FILE_KEY = BASE + ".test-classes";
131     public static final String JavaDoc DEFAULT_VERBOSE = "false";
132     public static final String JavaDoc DEFAULT_ITERATIONS = "2";
133     public static final String JavaDoc DEFAULT_CONNECT = "true";
134     public static final String JavaDoc DEFAULT_NODE_AGENT_NAMES = ALL_NODE_AGENTS;
135     public static final String JavaDoc DEFAULT_EXPANDED_TESTING = "false";
136     public static final String JavaDoc DEFAULT_TEST_OFFLINE = "false";
137     
138     public static final String JavaDoc DEFAULT_ARCHIVES_TO_DEPLOY = "";
139     public static final String JavaDoc DEFAULT_DEPLOY_NUM_THREADS = "10";
140     
141     public static final String JavaDoc DEFAULT_UPLOAD_DOWNLOAD_MGR_TEST_THREADS = "10";
142     public static final String JavaDoc DEFAULT_UPLOAD_DOWNLOAD_MGR_TEST_BIG_FILE_KB = "1536";
143     
144     
145         public static Map JavaDoc<String JavaDoc,String JavaDoc>
146     getDefaults()
147     {
148         final Map JavaDoc<String JavaDoc,String JavaDoc> props = new HashMap JavaDoc<String JavaDoc,String JavaDoc>();
149         
150         props.put( HOST_KEY, DEFAULT_HOST);
151         props.put( PORT_KEY, DEFAULT_PORT);
152         props.put( USER_KEY, DEFAULT_USER);
153         props.put( PASSWORD_KEY, DEFAULT_PASSWORD);
154         props.put( TRUSTSTORE_KEY, DEFAULT_TRUSTSTORE);
155         props.put( TRUSTSTORE_PASSWORD_KEY, DEFAULT_TRUSTSTORE_PASSWORD);
156         props.put( USE_TLS_KEY, DEFAULT_USE_TLS);
157         props.put( CONNECT_KEY, DEFAULT_CONNECT);
158         props.put( TEST_OFFLINE_KEY, DEFAULT_TEST_OFFLINE);
159         props.put( DOMAIN_XML_KEY, "./domain.xml" );
160         
161         props.put( NODE_AGENTS_KEY, ALL_NODE_AGENTS);
162         props.put( EXPANDED_TESTING_KEY, DEFAULT_EXPANDED_TESTING);
163         
164         props.put( RUN_THREADED_KEY, DEFAULT_RUN_THREADED);
165         props.put( VERBOSE_KEY, DEFAULT_VERBOSE);
166         props.put( TEST_CLASSES_FILE_KEY, DEFAULT_TEST_CLASSES_FILE_KEY);
167         props.put( ITERATIONS_KEY, DEFAULT_ITERATIONS );
168         
169         props.put( ARCHIVES_TO_DEPLOY_KEY, DEFAULT_ARCHIVES_TO_DEPLOY);
170         props.put( DEPLOY_NUM_THREADS, DEFAULT_DEPLOY_NUM_THREADS);
171         
172         props.put( UPLOAD_DOWNLOAD_MGR_TEST_THREADS, DEFAULT_UPLOAD_DOWNLOAD_MGR_TEST_THREADS);
173         props.put( UPLOAD_DOWNLOAD_MGR_TEST_BIG_FILE_KB, DEFAULT_UPLOAD_DOWNLOAD_MGR_TEST_BIG_FILE_KB);
174         
175         props.put( DEFAULT_PROPERTIES_FILE, DEFAULT_PROPERTIES_FILE );
176         return( props );
177     }
178 };
179
180
Popular Tags