RFR(S): 8227122: [TESTBUG] Create Docker sidecar test cases

Bob Vandette bob.vandette at oracle.com
Wed Jul 3 14:49:30 UTC 2019

Very nice addition to ensuring support for popular docker use cases.

A few comments on the TestJcmdWithSideCar.java

1. Shouldn’t you use @requires to only run this test on Linux x64?  CanTestDocker should
protect us but your test wouldn’t run on windows if we added docker support there.

2. Why is this repeated?
 149             "--pid=container:" + MAIN_CONTAINER_NAME,
 150             "--pid=container:" + MAIN_CONTAINER_NAME,
3. I’m a little concerned about the built in fixed delays especially the startMainContainer one.
We don’t want any intermittent test failures. Could you maybe add a DockerThread.checkIsAlive
function and call that every second for 20 seconds and then give up?

What tier are you adding this test to?


> On Jul 2, 2019, at 6:24 PM, mikhailo.seledtsov at oracle.com wrote:
> Please review this new test that uses a Docker sidecar pattern to manage/monitor JVM running in the main payload container.
> Sidecar is a common pattern used in the cloud environments for monitoring among other uses. In side car pattern the main application/service container that runs the payload is paired with a sidecar container. It is achieved by sharing certain namespace aspects between the two containers such as PID namespace, specific sub-directories, IPC and more.
> This test implements the following cases:
>   - "jcmd -l" to list java processes running in "main" container from the "sidecar" container
>   - "jhsdb jinfo" in the sidecar configuration
>   - jcmd <some-command>
> This change also builds a basis for more test cases in the future.
> Minor changes were done to DockerTestUtils:
>   - changing access to DOCKER_COMMAND constant to public
>   - minor spelling and terminology corrections
>     JBS: https://bugs.openjdk.java.net/browse/JDK-8227122
>     Webrev: http://cr.openjdk.java.net/~mseledtsov/8227122.00/
>     Testing:
>         1. ran Docker tests on Linux-x64 - PASS
>         2. Running Docker tests in test cluster - in progress
> Thank you,
> Misha

More information about the hotspot-runtime-dev mailing list