Besides all our automated tests, sometimes it is useful to run some tests by hand to get a feel for the performance of Apache ACE and tweak it for specific scenarios. To aid in setting up and running such tests, an Ant script was made that allows you to:
- Configure it to create a runnable server, a collection of targets or both.
- Run every configured node.
- Cleanup afterwards.
Typical use cases include running a set of targets and a server on the same box, or having two or more boxes and distributing server and (groups of) targets over both. The script, which is located in the ace-test
project folder, assumes you have a full checkout of ACE and that you have actually already built the code (mvn -DskipTests=true clean install
or something similar). It also assumes you have a recent version of Ant on your machine.
Before using the script, there are several variables that you can configure that influence its behaviour:
- with-server - when defined, will run an ACE server;
- with-targets - when defined, will run a number of targets;
- targets - a comma separated list of target names ("target-" will be used as prefix for all of them);
- server-host - the discovery URL for the server to use with the targets
- version - the ACE version to use (should match whatever version of the code you checked out).
To run:
ant unzip
will unzip all required code into folders under the current directory;ant run
will run all nodes (and at least on Linux and Mac OS X stop them again when you hit Ctrl-C);ant rm
will delete all folders and files created in steps 1 and 2.
For example, to run the ACE management server with 10 targets, we should do the following:
[localhost:~/]$ ant -Dtargets=1,2,3,4,5,6,7,8,9,10 unzip run ...(CTRL+C)... [localhost:~/]$ ant -Dtargets=1,2,3,4,5,6,7,8,9,10 rm