Skip to content

Commit

Permalink
8253739: java/awt/image/MultiResolutionImage/MultiResolutionImageObse…
Browse files Browse the repository at this point in the history
…rverTest.java fails

Backport-of: 928da49
  • Loading branch information
RealCLanger committed Jan 25, 2024
1 parent 3f42f4c commit d3675a0
Showing 1 changed file with 4 additions and 4 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -40,7 +40,7 @@

public class MultiResolutionImageObserverTest {

private static final int TIMEOUT = 500;
private static final int TIMEOUT = 2000;

public static void main(String[] args) throws Exception {

Expand Down Expand Up @@ -70,7 +70,7 @@ private static void waitForImageLoading(LoadImageObserver observer,
long endTime = System.currentTimeMillis() + TIMEOUT;

while (!observer.loaded && System.currentTimeMillis() < endTime) {
Thread.sleep(TIMEOUT / 10);
Thread.sleep(TIMEOUT / 100);
}

if (!observer.loaded) {
Expand Down Expand Up @@ -101,7 +101,7 @@ private static void generateImage(int scale) throws Exception {
private static class LoadImageObserver implements ImageObserver {

private final int infoflags;
private boolean loaded;
private volatile boolean loaded;

public LoadImageObserver(int flags) {
this.infoflags = flags;
Expand Down

1 comment on commit d3675a0

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.