Skip to content
Permalink
Browse files
8272966: test/jdk/java/awt/Robot/FlushCurrentEvent.java fails by timeout
Reviewed-by: clanger
  • Loading branch information
mrserb committed Sep 10, 2021
1 parent bfb52f2 commit 180bc526b025e815b43070150369ae399e27753f
Showing 1 changed file with 9 additions and 2 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2021, 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
@@ -37,7 +37,14 @@ public static void main(String[] args) throws Exception {
Robot robot = new Robot();
AtomicBoolean done = new AtomicBoolean();
EventQueue.invokeLater(() -> {
robot.delay(15000);
// Calling the robot.delay() will cause a deadlock because it is a
// synchronized method prior to JDK 15 (see JDK-8210231)
// robot.delay(15000);
try {
Thread.sleep(15000);
} catch(InterruptedException ite) {
throw new RuntimeException(ite);
}
done.set(true);
});
robot.waitForIdle();

1 comment on commit 180bc52

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 180bc52 Sep 10, 2021

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.