jdk-24/test/jdk/sun/management/jdp
2024-09-16 18:24:47 +00:00
..
ClientConnection.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
DynamicLauncher.java 8310525: DynamicLauncher for JDP test needs to try harder to find a free port 2024-09-16 18:24:47 +00:00
JdpDefaultsTest.java 8210894: remove jdk/testlibrary/Asserts 2018-09-21 14:50:06 -07:00
JdpJmxRemoteDynamicPortTest.java 8210894: remove jdk/testlibrary/Asserts 2018-09-21 14:50:06 -07:00
JdpJmxRemoteDynamicPortTestCase.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
JdpOffTest.java 8210894: remove jdk/testlibrary/Asserts 2018-09-21 14:50:06 -07:00
JdpOffTestCase.java 8196028: JMX: Not enough JDP packets received before timeout 2018-03-20 13:40:03 +05:30
JdpOnTestCase.java 8210894: remove jdk/testlibrary/Asserts 2018-09-21 14:50:06 -07:00
JdpSpecificAddressTest.java 8210894: remove jdk/testlibrary/Asserts 2018-09-21 14:50:06 -07:00
JdpTestCase.java 8175542: JMX: Not enough JDP packets received 2018-01-16 12:38:21 +05:30
JdpTestUtil.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
JdpTestUtilTest.java 8210894: remove jdk/testlibrary/Asserts 2018-09-21 14:50:06 -07:00
PacketTest.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
PortAlreadyInUseTest.java 8210732: remove jdk.testlibrary.Utils 2018-09-14 14:02:57 -07:00
README 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TEST.properties 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00

The tests in this folder are contributed by alex.schenkman@oracle.com

There are three Jdp test cases in this folder:
 1) Jdp is turned off.
 2) Jdp is turned on, using default values
 3) Jdp is turned on, using a specific IP and port

For the test cases above, the actual tests are:
 1) JdpOffTestCase.java
 2) JdpOnTestCase.java
 3) JdpOnTestCase.java, using different parameters.
All these three test are implemented as subclasses of JdpTestCase.java.

For all of these three tests, the VM sending the Jdp packets is also catching them.
That is, while the VM itself is sending Jdp multicast packets, the program executed by
that same VM is listening for those packets.

These tests above work as follows:
 1) Start a VM with Jdp off, make sure that no Jdp packets arrive at the default IP/port.
 2) Start a VM with Jdp on, make sure three packets arrive at the default IP/port.
 3) Start a VM with Jdp on a specific IP/port, make sure three packets arrive.

To make sure that we are not catching Jdp packets from some other VM, the INSTANCE_NAME
attribute is set to a unique id. The setting of this unique id is done by a launcher.
There are three launchers, one for each of the tests above:
 1) JdpOffTest.java
 2) JdpDefaultsTest.java
 3) JdpSpecificAddressTest.java
All these three tests are implemented as subclasses of DynamicLauncher.java.

So, JdpOffTest.class will execute JdpOffTestCase.class (using ProcessTools),
and that will exercise test case nr.1; and so on for the other cases.

These launchers are also the entry points for JTreg.
This means that JTreg will only see these launchers as tests.
You might run the tests without JTreg, as long as you specify all the VM optiones needed.
Look at the launcher to determine what is needed. Do not forget -Dtest.jdk, that is set by JTreg.

JMX must be enabled in order to enable Jdp. This requires a free port (com.sun.management.jmxremote.port).
To avoid port-busy conflicts, DynamicLauncher.java will try to find a free port up to three times.

There are some other tests used for test development, and not meant to be run automatically by JTreg.
 1) PortAlreadyInUse.java, used to test the retry mechanism to find a free port.
 2) PacketTest.java, Jdp packet sanity.
 3) JdpTestUtil.java, Utility functions to read a Jdp packet.
 4) JdpTestUtilTest.java, Unit tests for JdpTestUtil.java