<AWT Dev> Review Request for 8039749: Migrate needed functionality from all subclasses of java.awt.Robot in jdk/test directory to the ancestor
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Mon Sep 8 12:26:09 UTC 2014
Hello,
I think that we should extend our Robot implementation, but implement
this with care.
The primary goal of the Robot class is to write the automation tests,
and need of creation of extensions for execution of the elementary
actions leads me to thought that this class can be expanded.
I guess that our regression tests are one of primary (biggest) clients
of our Robot API, therefore experience of use of our API in these tests
shall be considered.
As for the current webrev, we should not copy all the methods from the
ExtendedRobot, but copy only most useful of them, plus we should make a
research of other external usage of Robot API(jemmy, etc) and check
methods name conventions(like type vs keyType etc) probably on some
other non-java toolkits.
On 27.08.2014 15:16, Anthony Petrov wrote:
> Hi Dmitriy,
>
> While I realize that all the new methods are useful when writing JDK
> regression tests, do you have any evidence that would suggest that
> these same methods could be useful to and/or have been requested by
> external developers? All of them look like convenient APIs and I'm not
> entirely convinced if we should ultimately add them all to our public
> Robot API. Personally, I don't see a problem with using the custom
> ExtendedRobot class specifically for tests. This also helps reduce the
> JDK and JRE static footprints, btw. But then again, I'm not an SQE
> engineer.
>
> I don't have a strong opinion on this and I'm leaving the final
> decision to Sergey and other AWT team members, but I just thought I'd
> bring this up here.
>
> As for the implementation, I see that you're adding realSync() calls
> in some places where they were not previously there. For example,
> calling Robot.waitForIdle() before the fix would not cause a
> realSync() to occur, while after your fix it does. This is a
> significant change from threading and native event queue
> synchronization perspectives, and I'm not sure if this should be done.
> Again, I do know that in tests it is useful to call realSync() here
> and there, but I'm not sure we should spread the calls all over the
> Robot implementation simply because of this reason. The calls may in
> fact produce some unwanted side-effects for existing applications
> employing the Robot (e.g. introducing unwanted delays, or performing
> excessive synchronization while the app didn't really need it, etc.) I
> consider this change very risky.
>
> --
> best regards,
> Anthony
>
> On 8/26/2014 5:40 PM, Dmitriy Ermashov wrote:
>> Hi awt team!
>>
>> A few months ago we have consolidated methods required by functional and
>> regression tests in ExtendedRobot class. After a period of extensive
>> testing, it's time to migrate them to java.awt.Robot.
>>
>> Please review the changeset:
>> http://cr.openjdk.java.net/~dermashov/8039749/webrev.00/
>>
>> Corresponding bug:
>> https://bugs.openjdk.java.net/browse/JDK-8039749
>>
>> Note that this change is an important prerequisite to a massive
>> regression and functional test suites change for Jigsaw.
>> As one can see the webrev contains changes in class signature. The CCC
>> request will take place after the code review.
>>
>> Thanks,
>> Dima
--
Best regards, Sergey.
More information about the awt-dev
mailing list