1The tests in this folder are contributed by alex.schenkman@oracle.com
2
3There are three Jdp test cases in this folder:
4 1) Jdp is turned off.
5 2) Jdp is turned on, using default values
6 3) Jdp is turned on, using a specific IP and port
7
8For the test cases above, the actual tests are:
9 1) JdpOffTestCase.java
10 2) JdpOnTestCase.java
11 3) JdpOnTestCase.java, using different parameters.
12All these three test are implemented as subclasses of JdpTestCase.java.
13
14For all of these three tests, the VM sending the Jdp packets is also catching them.
15That is, while the VM itself is sending Jdp multicast packets, the program executed by
16that same VM is listening for those packets.
17
18These tests above work as follows:
19 1) Start a VM with Jdp off, make sure that no Jdp packets arrive at the default IP/port.
20 2) Start a VM with Jdp on, make sure three packets arrive at the default IP/port.
21 3) Start a VM with Jdp on a specific IP/port, make sure three packets arrive.
22
23To make sure that we are not catching Jdp packets from some other VM, the INSTANCE_NAME
24attribute is set to a unique id. The setting of this unique id is done by a launcher.
25There are three launchers, one for each of the tests above:
26 1) JdpOffTest.java
27 2) JdpDefaultsTest.java
28 3) JdpSpecificAddressTest.java
29All these three tests are implemented as subclasses of DynamicLauncher.java.
30
31So, JdpOffTest.class will execute JdpOffTestCase.class (using ProcessTools),
32and that will exercise test case nr.1; and so on for the other cases.
33
34These launchers are also the entry points for JTreg.
35This means that JTreg will only see these launchers as tests.
36You might run the tests without JTreg, as long as you specify all the VM optiones needed.
37Look at the launcher to determine what is needed. Do not forget -Dtest.jdk, that is set by JTreg.
38
39JMX must be enabled in order to enable Jdp. This requires a free port (com.sun.management.jmxremote.port).
40To avoid port-busy conflicts, DynamicLauncher.java will try to find a free port up to three times.
41
42There are some other tests used for test development, and not meant to be run automatically by JTreg.
43 1) PortAlreadyInUse.java, used to test the retry mechanism to find a free port.
44 2) PacketTest.java, Jdp packet sanity.
45 3) JdpTestUtil.java, Utility functions to read a Jdp packet.
46 4) JdpTestUtilTest.java, Unit tests for JdpTestUtil.java
47