jmx-dev RFR 7140929: NotSerializableNotifTest.java fails intermittently

Daniel Fuchs daniel.fuchs at oracle.com
Mon Oct 21 07:56:07 PDT 2013


On 10/21/13 1:03 PM, Jaroslav Bachorik wrote:
> Hi,
>
> please, review the following small test change:
>
> Issue:  https://bugs.openjdk.java.net/browse/JDK-7140929
> Webrev: http://cr.openjdk.java.net/~jbachorik/7140929/webrev.00
>
> The test fails intermittently, mostly when it is run with -Xcomp option.
> The failure is due to fixed timeout used in the test when waiting for
> the notifications arrival. Tests of such slow configurations are run
> with "timeoutfactor" set but the NotSerializableNotifTest does not
> respect the timeoutfactor.
>
> The patch allows the test to reflect the provided "timeoutfactor" and
> therefore successfully pass even when -Xcomp is used.
>
> Thanks,
>
> -JB-

Hi Jaroslav,

Looks good to me. I didn't know timeoutFactor was availaible as a system 
property.

You can probably simplify the code like this:

private static double timeoutFactor;
...

main(...) {
     ...
     timeoutFactor = Double.parseDouble(
                  System.getProperty("test.timeout.factor", "1.0")
              );
}

(no need for the timeoutVal variable)

regards,

-- daniel


More information about the serviceability-dev mailing list