8047218: [TEST_BUG] java/awt/FullScreen/AltTabCrashTest/AltTabCrashTest.java fails with exception
Reviewed-by: azvegint, kizune, pbansal
This commit is contained in:
parent
1a0ff28ea1
commit
271a0c7133
test/jdk
@ -205,7 +205,6 @@ java/awt/event/MouseEvent/MouseButtonsAndKeyMasksTest/MouseButtonsAndKeyMasksTes
|
||||
|
||||
java/awt/dnd/URIListToFileListBetweenJVMsTest/URIListToFileListBetweenJVMsTest.java 8194947 generic-all
|
||||
java/awt/Frame/FramesGC/FramesGC.java 8079069 macosx-all
|
||||
java/awt/FullScreen/AltTabCrashTest/AltTabCrashTest.java 8047218 generic-all
|
||||
java/awt/GridLayout/LayoutExtraGaps/LayoutExtraGaps.java 8000171 windows-all
|
||||
java/awt/Mouse/GetMousePositionTest/GetMousePositionWithPopup.java 8196017 windows-all
|
||||
java/awt/Scrollbar/ScrollbarMouseWheelTest/ScrollbarMouseWheelTest.java 8196018 windows-all,linux-all
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
@ -73,7 +73,6 @@ public class AltTabCrashTest extends Frame {
|
||||
VolatileImage vimg = null;
|
||||
BufferStrategy bufferStrategy = null;
|
||||
volatile boolean timeToQuit = false;
|
||||
static final Object lock = new Object();
|
||||
|
||||
enum SpriteType {
|
||||
OVALS, VIMAGES, BIMAGES, AAOVALS, TEXT
|
||||
@ -119,21 +118,17 @@ public class AltTabCrashTest extends Frame {
|
||||
render(g);
|
||||
g.dispose();
|
||||
}
|
||||
Thread t = new BallThread();
|
||||
t.start();
|
||||
Thread ballThread = new BallThread();
|
||||
ballThread.start();
|
||||
if (autoMode) {
|
||||
Thread tt = new AltTabberThread();
|
||||
tt.start();
|
||||
synchronized (lock) {
|
||||
while (!timeToQuit) {
|
||||
try {
|
||||
lock.wait(200);
|
||||
} catch (InterruptedException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
Thread tabberThread = new AltTabberThread();
|
||||
tabberThread.start();
|
||||
try {
|
||||
ballThread.join();
|
||||
tabberThread.join();
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
t = null;
|
||||
dispose();
|
||||
}
|
||||
}
|
||||
@ -202,10 +197,7 @@ public class AltTabCrashTest extends Frame {
|
||||
out = !out;
|
||||
}
|
||||
System.err.println("Alt+tabber finished.");
|
||||
synchronized (lock) {
|
||||
timeToQuit = true;
|
||||
lock.notify();
|
||||
}
|
||||
timeToQuit = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user