This class implements the search policy for obtaining test parameter values. The sources of test parameters, in order of precedence, are:
setOverrides
method test properties
. The overrides exist to allow the harness to temporarily redefine the values for installation properties such as com.sun.jini.jsk.home
or com.sun.jini.qa.home
. This is needed when generating the command line for the SlaveTest VM for local parameters that must take precedence over the serialized QAConfig
instance provided by the master. The dynamic properties exist to allow a test to create or override a test property on-the-fly. This would most likely be used if a test needed to construct a parameter needed by an admin, for instance to provide a generated codebase. Dynamic properties are automatically reset for every test, and are rarely used. The other sources are treated as immutable objects.
The test description file generally provides the parameters used by the harness to locate and execute a test, as well as test specific property values.
The net.jini.config.Configuration object associated with this test configuration. This object may contain values which have relavance only to particular configurations in a test run (for instance, the value of com.sun.jini.qa.harness.integrityhash
is only meaningful for secure configuations). The ConfigurationFile
from which the Configuration
is derived is named by the testConfiguration
property in the test description.
The configuration set property file contains properties which should be applied to all tests executing in a given configuration. This property file is named configSet.properties
and resides in the root directory of the configuration set.
The command-line property file is the primary place for those who run tests to provide installation values, or to override the defaults provided by qaDefaults.
The default configuration file is named com.sun.jini.qa.resources.qaDefaults
.
Before any parameter value is returned, '$' substitutions are performed (recursively). Any occurances of the token <gethost>
are replaced with the name of the host on which this code is running. Any occurances of the token <harnessJar>
are replaced with the fully qualified path of the harness JAR file. Any occurances of the token <testJar>
are replaced with the fully qualified path of the test JAR file.
Any tokens of the form <url:foo> will result in the generation of a URL for foo
. A search is performed for the file relative to all of the root directories defined by the searchPath
property. If the file is found, a file URL for the fully qualified name of the file is generated and returned as the token value. Otherwise, test and harness JAR files are searched for foo
, looking first relative to the directory in which the test description file is located, then relative to the root of the test jar file and finally relative to the root of the harness jar file. In this case, an appropriate JAR file URL is generated and returned as the token value. If the file is not found, a TestException
is thrown.
Any tokens of the form <file:foo> will result in the generation of a fully qualified path for foo
. A search is performed for the file relative to all of the root directories defined by the searchPath
property. If the file is found, the fully qualified name of the file is generated and returned as the token value. If the file is not found, a TestException
is thrown.
This class is serializable. It's constructor is called only in the master/slave harness VMs. The instance is serialized and passed from the master harness to the master test through its System.in stream. The master harness also passes a serialized copy to the slave harness in a SlaveTestRequest object, which in turn passes the copy to the slave test VM though its System.in stream.
The logger named com.sun.jini.qa.harness.config
is used to log debug information
Level | Description |
---|---|
SEVERE | if a parsing error when doing string substitution, on failure to find the component-level resource file, or on failure to start a shared group |
FINE | any calls to logDebugText |
|
|
|
|
|
|
|
|
|
|