<AWT Dev> RFR: 8253739: java/awt/image/MultiResolutionImage/MultiResolutionImageObserverTest.java fails

Sergey Bylokhov serb at openjdk.java.net
Thu Oct 1 08:10:50 UTC 2020


On Thu, 1 Oct 2020 06:01:03 GMT, Jayathirth D V <jdv at openjdk.org> wrote:

> Locally when i run this test i am seeing both the observers getting called and flags are updated.
> I suspect this to be an issue with less timeout which we are using for verifying whether observer is getting called or
> not. Also i have increased sleep time. I have increased timeout and verified in CI pipeline there is no issue.

test/jdk/java/awt/image/MultiResolutionImage/MultiResolutionImageObserverTest.java line 76:

> 74:         }
> 75:
> 76:         if (!observer.loaded) {

The "loaded" field is read by the main thread but set by the image loader thread, probably it is better to mark it as
volatile.

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

PR: https://git.openjdk.java.net/jdk/pull/450


More information about the awt-dev mailing list