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

mikhailo.seledtsov at oracle.com mikhailo.seledtsov at oracle.com
Wed Jul 10 02:45:38 UTC 2019

Hi Bob,

On 7/3/19 7:49 AM, Bob Vandette wrote:
> Very nice addition to ensuring support for popular docker use cases.
Thank you for reviewing the change.
> 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.

Looks like all other Docker tests in this directory use "@requires 
docker.support". This can be handy for other platforms, such as 
Linux-arm, Linux-PPC. Also, for development purposes, a user can run 
tests on Mac by simple temporary modification to docker.support.

Unless you have strong position on this, I would like to continue using 
just "@requires docker.support".

> 2. Why is this repeated?
>   149             "--pid=container:" + MAIN_CONTAINER_NAME,
>   150             "--pid=container:" + MAIN_CONTAINER_NAME,
Good catch. Will fix it.
> 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?
Sounds good, I will do it the way you recommend.
> What tier are you adding this test to?
> Thanks,
> Bob.
I will upload the second webrev after I update the changes and retest.

Thank you,


>> On Jul 2, 2019, at 6:24 PM, mikhailo.seledtsov at oracle.com 
>> <mailto: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