[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-swing-dev
Subject: Re: <Swing Dev> [OpenJDK 2D-Dev] [12] Review Request: 8213110 Remove the use of applets in automatic
From: Phil Race <philip.race () oracle ! com>
Date: 2019-01-30 22:53:51
Message-ID: 9c2624b4-7e7e-32c3-13f2-2bea899632a4 () oracle ! com
[Download RAW message or body]
Oh .. and I meant to ask what probably is an obvious question but needs
to be asked anyway.
You say you did not try to fix tests that already fail - this is just a
conversion - but did you
confirm there are no NEW failures on any platform ?
-phil.
On 1/30/19 2:29 PM, Phil Race wrote:
>
> You discuss the life cycle of an applet in jtreg
> -----------
> - Call init() and start() methods of the Applet
> - Waits for 2 seconds
> - Call stop() and destroy() methods of the Applet
> - Dispose the frame
> ------
>
> I see init() and start() being used but I don't see the rest replaced.
> Why not ?
> Do you really mean jtreg() kills the applet just two seconds after
> start() returns ?
>
>
> For the tests where you do something like
> main(...) {
> ....
> obj.init();
> obj.start();
>
> eg here :
> http://cr.openjdk.java.net/~serb/8213110/webrev.04/test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest.java.sdiff.html
> would it make sense to invoke that code on the EDT instead of the main
> thread ?
>
> EventQueue.invokeLater(new Runnable() {
> Like already happens here :
> http://cr.openjdk.java.net/~serb/8213110/webrev.04/test/jdk/java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.java.sdiff.html
> We have lots of AWT tests that use the main thread so not a blocker
> but just a question and
> likely could mean further updates to some tests are needed if an
> exception no longer propagates
> on an expected thread.
>
>
> -phil.
>
> On 11/26/18 6:29 PM, Sergey Bylokhov wrote:
> > The "ProblemList.txt" is updated in the new version:
> > http://cr.openjdk.java.net/~serb/8213110/webrev.04
> >
> > On 08/11/2018 10:57, Sergey Bylokhov wrote:
> > > Note that for some of the tests I'll need to update the problem list
> > > and replace the .html by the .java.
> > > But since we actively updates the problem lists right now I
> > > postponed this task for a weekend.
> > >
> > > On 07/11/2018 15:47, Sergey Bylokhov wrote:
> > > > Hello.
> > > > Please review the fix for jdk 12.
> > > >
> > > > Bug: https://bugs.openjdk.java.net/browse/JDK-8213110
> > > > Webrev: http://cr.openjdk.java.net/~serb/8213110/webrev.03
> > > >
> > > > Description of the bug:
> > > > A number of our tests in jdk still launch by applets via "@run
> > > > applet".
> > > > Usually we drop this usage when we update the test for some reason,
> > > > and
> > > > in this fix we will drop them completely for automated tests from
> > > > the open repo.
> > > > I did not update the tests which are specific for Applet API,
> > > > manual tests, or tests
> > > > which are currently under review for some other bugs.
> > > >
> > > > Note: the "@run applet" means, that the jtreg will do these steps:
> > > > - Creates a frame as a holder for the Applet
> > > > - Creates an applet(which is undecorated panel) and adds it to
> > > > the frame
> > > > - Sets the size of the frame
> > > > - Place the frame to the center of the screen
> > > > - Make the frame visible
> > > > - Call init() and start() methods of the Applet
> > > > - Waits for 2 seconds
> > > > - Call stop() and destroy() methods of the Applet
> > > > - Dispose the frame
> > > >
> > > >
> > > > Description of the fix:
> > > >
> > > > - In all cases the usage of the Applet API was dropped
> > > > - In the common case when the applet was used as launcher, this
> > > > code now used instead:
> > > > public static void main(final String[] args) {
> > > > TestName app = new TestName();
> > > > app.init();
> > > > app.start();
> > > > }
> > > > Example:
> > > > http://cr.openjdk.java.net/~serb/8213110/webrev.03/test/jdk/java/awt/Choice/PopdownGeneratesMouseEvents/PopdownGeneratesMouseEvents.java.sdiff.html
> > > >
> > > > - In some cases it was possible to replace init()/start() by the
> > > > simple main() method.
> > > > Example:
> > > > http://cr.openjdk.java.net/~serb/8213110/webrev.03/test/jdk/java/awt/Choice/PopupPosTest/PopupPosTest.java.sdiff.html
> > > >
> > > > - Some of the tests were used the "extend Applet" w/o a reasons:
> > > > Example:
> > > > http://cr.openjdk.java.net/~serb/8213110/webrev.03/test/jdk/java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java.sdiff.html
> > > >
> > > > - Some of the tests shows the applet window(which was unrelated
> > > > to the test itself) in the center of the screen.
> > > > Example:
> > > > http://cr.openjdk.java.net/~serb/8213110/webrev.03/test/jdk/java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowRetaining.java.sdiff.html
> > > >
> > > > - Some of the tests uses the applet as a place holder for the
> > > > test components.
> > > > In this case it was necessary to change the Applet API to the
> > > > Frame API, and complete
> > > > the steps which were done by the jtreg:
> > > > Example:
> > > > http://cr.openjdk.java.net/~serb/8213110/webrev.03/test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest.java.sdiff.html
> > > >
> > > >
> > > > Notes:
> > > > - To simplify the review I tried to not change the logic of the
> > > > tests,
> > > > so if the test fail before the fix, then it will fail after the
> > > > fix.
> > > > I would like to create the separate CRs for all additional(if
> > > > any) cleanup of these tests.
> > > > - Just a few exception from the above is additional calls to:
> > > > "setLocationRelativeTo" to place the window to the center of
> > > > the screen
> > > > "robot.waitForIdle()"/"setUndecorated()" to make the tests more
> > > > stable(when I compared the tests before/after the fix)
> > > >
> > > >
> > >
> > >
> >
> >
>
[Attachment #3 (text/html)]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Oh .. and I meant to ask what probably is an obvious question but
needs to be asked anyway. <br>
You say you did not try to fix tests that already fail - this is
just a conversion - but did you<br>
confirm there are no NEW failures on any platform ?<br>
<br>
-phil.<br>
<br>
<div class="moz-cite-prefix">On 1/30/19 2:29 PM, Phil Race wrote:<br>
</div>
<blockquote type="cite"
cite="mid:61b1cfa2-0944-ad7c-ac03-779035070eaa@oracle.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<br>
You discuss the life cycle of an applet in jtreg <br>
-----------<br>
- Call init() and start() methods of the Applet <br>
- Waits for 2 seconds <br>
- Call stop() and destroy() methods of the Applet <br>
- Dispose the frame <br>
------<br>
<br>
I see init() and start() being used but I don't see the rest
replaced. Why not ?<br>
Do you really mean jtreg() kills the applet just two seconds after
start() returns ?<br>
<br>
<br>
For the tests where you do something like <br>
main(...) {<br>
....<br>
obj.init();<br>
obj.start();<br>
<br>
eg here :<br>
<a class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/~serb/8213110/webrev.04/test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest.java.sdiff.html"
moz-do-not-send="true">http://cr.openjdk.java.net/~serb/8213110/webrev.04/test/jdk/j \
ava/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest.java.sdiff.html</a><br> \
would it make sense to invoke that code on the EDT instead of the main thread ?<br>
<br>
<pre>EventQueue.invokeLater(new Runnable() {</pre>
Like already happens here :<br>
<a class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/~serb/8213110/webrev.04/test/jdk/java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.java.sdiff.html"
moz-do-not-send="true">http://cr.openjdk.java.net/~serb/8213110/webrev.04/test/jdk/java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.java.sdiff.html</a><br>
We have lots of AWT tests that use the main thread so not a
blocker but just a question and<br>
likely could mean further updates to some tests are needed if an
exception no longer propagates<br>
on an expected thread.<br>
<br>
<br>
-phil.<br>
<br>
<div class="moz-cite-prefix">On 11/26/18 6:29 PM, Sergey Bylokhov
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:d8f1c229-fba6-9cfd-5b64-b8c97234d69f@oracle.com">The
"ProblemList.txt" is updated in the new version: <br>
<a class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/~serb/8213110/webrev.04"
moz-do-not-send="true">http://cr.openjdk.java.net/~serb/8213110/webrev.04</a>
<br>
<br>
On 08/11/2018 10:57, Sergey Bylokhov wrote: <br>
<blockquote type="cite">Note that for some of the tests I'll
need to update the problem list and replace the .html by the
.java. <br>
But since we actively updates the problem lists right now I
postponed this task for a weekend. <br>
<br>
On 07/11/2018 15:47, Sergey Bylokhov wrote: <br>
<blockquote type="cite">Hello. <br>
Please review the fix for jdk 12. <br>
<br>
Bug: <a class="moz-txt-link-freetext"
href="https://bugs.openjdk.java.net/browse/JDK-8213110"
moz-do-not-send="true">https://bugs.openjdk.java.net/browse/JDK-8213110</a>
<br>
Webrev: <a class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/~serb/8213110/webrev.03"
moz-do-not-send="true">http://cr.openjdk.java.net/~serb/8213110/webrev.03</a>
<br>
<br>
Description of the bug: <br>
A number of our tests in jdk still launch by applets via
"@run applet". <br>
Usually we drop this usage when we update the test for some
reason, and <br>
in this fix we will drop them completely for automated tests
from the open repo. <br>
I did not update the tests which are specific for Applet
API, manual tests, or tests <br>
which are currently under review for some other bugs. <br>
<br>
Note: the "@run applet" means, that the jtreg will do these
steps: <br>
- Creates a frame as a holder for the Applet <br>
- Creates an applet(which is undecorated panel) and adds
it to the frame <br>
- Sets the size of the frame <br>
- Place the frame to the center of the screen <br>
- Make the frame visible <br>
- Call init() and start() methods of the Applet <br>
- Waits for 2 seconds <br>
- Call stop() and destroy() methods of the Applet <br>
- Dispose the frame <br>
<br>
<br>
Description of the fix: <br>
<br>
- In all cases the usage of the Applet API was dropped <br>
- In the common case when the applet was used as launcher,
this code now used instead: <br>
public static void main(final String[] args) { <br>
TestName app = new TestName(); <br>
app.init(); <br>
app.start(); <br>
} <br>
Example: <br>
<a class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/~serb/8213110/webrev.03/test/jdk/java/awt/Choice/PopdownGeneratesMouseEvents/PopdownGeneratesMouseEvents.java.sdiff.html"
moz-do-not-send="true">http://cr.openjdk.java.net/~serb/8213110/webrev.03/test/jdk/j \
ava/awt/Choice/PopdownGeneratesMouseEvents/PopdownGeneratesMouseEvents.java.sdiff.html</a><br>
<br>
- In some cases it was possible to replace init()/start()
by the simple main() method. <br>
Example: <br>
<a class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/~serb/8213110/webrev.03/test/jdk/java/awt/Choice/PopupPosTest/PopupPosTest.java.sdiff.html"
moz-do-not-send="true">http://cr.openjdk.java.net/~serb/8213110/webrev.03/test/jdk/java/awt/Choice/PopupPosTest/PopupPosTest.java.sdiff.html</a><br>
<br>
- Some of the tests were used the "extend Applet" w/o a
reasons: <br>
Example: <br>
<a class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/~serb/8213110/webrev.03/test/jdk/java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java.sdiff.html"
moz-do-not-send="true">http://cr.openjdk.java.net/~serb/8213110/webrev.03/test/jdk/j \
ava/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java.sdiff.html</a><br>
<br>
- Some of the tests shows the applet window(which was
unrelated to the test itself) in the center of the screen. <br>
Example: <br>
<a class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/~serb/8213110/webrev.03/test/jdk/java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowRetaining.java.sdiff.html"
moz-do-not-send="true">http://cr.openjdk.java.net/~serb/8213110/webrev.03/test/jdk/j \
ava/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowRetaining.java.sdiff.html</a><br>
<br>
- Some of the tests uses the applet as a place holder for
the test components. <br>
In this case it was necessary to change the Applet API
to the Frame API, and complete <br>
the steps which were done by the jtreg: <br>
Example: <br>
<a class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/~serb/8213110/webrev.03/test/jdk/java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest.java.sdiff.html"
moz-do-not-send="true">http://cr.openjdk.java.net/~serb/8213110/webrev.03/test/jdk/j \
ava/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest.java.sdiff.html</a><br> \
<br> <br>
Notes: <br>
- To simplify the review I tried to not change the logic
of the tests, <br>
so if the test fail before the fix, then it will fail
after the fix. <br>
I would like to create the separate CRs for all
additional(if any) cleanup of these tests. <br>
- Just a few exception from the above is additional calls
to: <br>
"setLocationRelativeTo" to place the window to the
center of the screen <br>
"robot.waitForIdle()"/"setUndecorated()" to make the
tests more stable(when I compared the tests before/after the
fix) <br>
<br>
<br>
</blockquote>
<br>
<br>
</blockquote>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic