public class DUnitConfigAntTask
extends org.apache.tools.ant.Task
This class is an Ant task that creates a Hydra conf file for
running Distributed Unit Tests. To use this task in a build file,
you must set up a taskdef such as:
<taskdef name="dunitconfig"
classname="dunit.impl.DUnitConfigAntTask"
classpath="${gemfire.home}/lib/tests.jar" />
Generates a Hydra config file for running Distributed Unit Tests.
The location of the generated file is specified with the file attribute. The tests classes are specified with the nested tests parameter (a FileSet).
| Attribute | Description | Required |
| confFile | Specifies the name of the Hydra configuration file to be generated. | Yes |
| btFile | Specifies the name of the battery test file to be generated. | Yes |
| tests | Specifies the test classes to be run. | Yes |
| dunitSites | Specifies the number of DUnit Environments to create. This is used allow parrralle dunit execution. | Yes |
| systemCount | Specifies the number of GemFire systems that the Distributed Unit Tests should be run with. | No |
| includeFile | Specifies the Hydra include file that contains the GemFire system configuration for the distributed unit tests. | No |
| logLevel | Specifies the log level of the distribution managers started by the DUnit test. | No |
| verbose | Should the distribution managers log
information about the messages that are sent/received
(true or false)? See
DistributionManager#VERBOSE |
No |
| extraLocatorClasspath | Specifies extra files that should be on the
hydra Locator's class path. See VmPrms.extraClassPaths. This is a path-like
structure and may be nested. |
No |
| extraControllerClasspath | Specifies extra files that should be on the
hydra Controller's class path. See VmPrms.extraClassPaths. This is a path-like
structure and may be nested. |
No |
| extraClientClasspath | Specifies extra files that should be on the
hydra clients' class path. See VmPrms.extraClassPaths. This is a path-like
structure and may be nested. |
No |
| param | Specifies an additional hydra parameter to be
included in the generated .conf files. See BasePrms. |
No |
| jprobeClient | Nested element that specified how JProbe should
be run on client VMs. See JProbePrms. |
No |
| debugJavaGroups | Should the distribution managers log
copious debug information about Jgroups
(true or false)? See
DistributionManager#VERBOSE. |
No |
<dunitconfig confFile="dunit.conf" btFile="dunit.bt"
systemCount="2">
<extraClientClasspath>
<fileset dir="${other.jars}" includes="*.jar"/>
</extraClientClasspath>
<param name="mytest.TestPrms-maxCount" value="1000"/>
<jprobeClient/>
<tests dir="${tests.src.dir}">
<include name="com/tests/distributed/**"/>
</tests>
</dunitconfig>
| Modifier and Type | Class and Description |
|---|---|
static class |
DUnitConfigAntTask.JProbe
Represents a JProbe configuration.
|
static class |
DUnitConfigAntTask.Param
Holds the name and value of a
hydra param
to be added to the generated .conf file. |
| Constructor and Description |
|---|
DUnitConfigAntTask() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.tools.ant.types.Path |
createExtraClientClasspath()
Creates a nested
extraClientClasspath path |
org.apache.tools.ant.types.Path |
createExtraControllerClasspath()
Creates a nested
extraControllerClasspath path |
org.apache.tools.ant.types.Path |
createExtraLocatorClasspath()
Creates a nested
extraLocatorClasspath path |
DUnitConfigAntTask.JProbe |
createJprobeclient()
Returns the
JProbe for the GemFire Client VM |
DUnitConfigAntTask.Param |
createParam()
Creates a nested
param |
org.apache.tools.ant.types.FileSet |
createTests()
Sets the test classes for which to generate config information
|
void |
execute()
Executes this task.
|
int |
getDunitSites()
Gets the number of dunitSites that will be created.
|
void |
setBtfile(File btFile)
Sets the file that will contain the a battery test configuration (.bt)
|
void |
setConffile(File configFile)
Sets the file that will contain the Hydra configuration (.conf)
|
void |
setDebugjavagroups(String debug) |
void |
setDunitSites(int sites)
Sets the number of dunitSites to create, this is passed into the conf
|
void |
setExtraVMArgs(String arg) |
void |
setIncludefile(String includeFileName)
Sets the name of the Hydra include file that contains the GemFire
system configurations.
|
void |
setLoglevel(String logLevel) |
void |
setSystemcount(int count)
Sets the number of GemFire systems to configure for.
|
void |
setUseIPv6(String useIt) |
void |
setVerbose(String verbose) |
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypepublic void execute()
throws org.apache.tools.ant.BuildException
execute in class org.apache.tools.ant.Taskorg.apache.tools.ant.BuildExceptionpublic void setBtfile(File btFile)
public void setConffile(File configFile)
public int getDunitSites()
setDunitSites(int)public void setDunitSites(int sites)
public void setSystemcount(int count)
public void setIncludefile(String includeFileName)
public void setLoglevel(String logLevel)
public void setVerbose(String verbose)
public void setExtraVMArgs(String arg)
public void setUseIPv6(String useIt)
public void setDebugjavagroups(String debug)
public org.apache.tools.ant.types.Path createExtraClientClasspath()
extraClientClasspath pathpublic org.apache.tools.ant.types.Path createExtraControllerClasspath()
extraControllerClasspath pathpublic org.apache.tools.ant.types.Path createExtraLocatorClasspath()
extraLocatorClasspath pathpublic DUnitConfigAntTask.JProbe createJprobeclient()
JProbe for the GemFire Client VMpublic DUnitConfigAntTask.Param createParam()
parampublic org.apache.tools.ant.types.FileSet createTests()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.