RFR: JDK-8300205: Swing test bug8078268 make latch timeout configurable

Alexey Ivanov aivanov at openjdk.org
Mon Jan 16 20:50:14 UTC 2023


On Mon, 16 Jan 2023 15:09:27 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> The test javax/swing/text/html/parser/Parser/8078268/bug8078268.java has a latch timeout that is currently fix but should better be configurable to better deal with slow test infrastructures.

test/jdk/javax/swing/text/html/parser/Parser/8078268/bug8078268.java line 41:

> 39: */
> 40: public class bug8078268 {
> 41:     private static final float timeoutFactor = Float.parseFloat(System.getProperty("test.timeout.factor", "1.0"));

Suggestion:

    private static final float timeoutFactor =
            Float.parseFloat(System.getProperty("test.timeout.factor", "1.0"));

The line is 115 chars long, I suggest wrapping it. Using static import for `parseFloat` will also reduce the length; `getProperty` could also be statically imported.

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

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



More information about the client-libs-dev mailing list