On Mon, 29 Aug 2022 21:50:14 GMT, Leonid Mesnik <lmes...@openjdk.org> wrote:

>> This task converts 2 shell tests to java version. 
>> test/java/lang/management/OperatingSystemMXBean/TestSystemLoadAvg.sh 
>> test/java/lang/management/RuntimeMXBean/TestInputArgument.sh
>
> test/jdk/java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java 
> line 69:
> 
>> 67:     }
>> 68: 
>> 69:     @Test(invocationCount = 5, timeOut = 300)
> 
> I am not sure it is the correct replacement. Accordingly to TestNG doc the 
> invocationCount = 5 means that TestNG calls the test 5 times.  And test fails 
> if any of the invocations fail while the bash script makes 5 attempts and 
> passes if testcase passed in any of them.

Good catch! I've missed the exit statement in the original shell script.

-------------

PR: https://git.openjdk.org/jdk/pull/9848

Reply via email to