Skip to content
Permalink
Browse files
8253739: java/awt/image/MultiResolutionImage/MultiResolutionImageObse…
…rverTest.java fails

Reviewed-by: serb
  • Loading branch information
jayathirthrao committed Oct 1, 2020
1 parent 3e96721 commit 928da494a853c164452c96d01318c94d115ca946
Showing with 4 additions and 4 deletions.
  1. +4 −4 test/jdk/java/awt/image/MultiResolutionImage/MultiResolutionImageObserverTest.java
@@ -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
@@ -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 {

@@ -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) {
@@ -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;

1 comment on commit 928da49

@bridgekeeper

This comment has been minimized.

Copy link

@bridgekeeper bridgekeeper bot commented on 928da49 Oct 1, 2020

Please sign in to comment.