<AWT Dev> [8] Review request for 7147408 [macosx] Add autodelay to fix a regression test

Alexander Scherbatiy alexandr.scherbatiy at oracle.com
Thu Nov 1 07:10:59 PDT 2012


   Привет,

   У нас есть вот такая страничка, где рассказывается, как лучше всего 
переносить тесты в open репозиторий:
      http://spbweb.russia.sun.com/tiki/tiki-index.php?page=TestBugFixing

    Тесты в closed репозитории писались давно и они могут не  запускать 
Swing на EDT или  использовать задержки для ожидания того, что все 
события прошли.
    Мы обычно переписываем такие тесты, чтобы избежать в дальнейшем 
непредвиденных падений.

   Спасибо,
   Александр.

On 11/1/2012 6:04 PM, Alexander Scherbatiy wrote:
>
> - The test needs to create and use Swing components only on EDT.
>    The same is for JApplet (see 
> http://docs.oracle.com/javase/tutorial/uiswing/components/applet.html).
>    In the same way the following variable initialization is not 
> correct because the JEditorPane is not created on the EDT:
>     private JEditorPane jep = new JEditorPane();
>
> - The test fails with the compilation error: cannot find symbol 
> Util.blockTillDisplayed(jep);
>   Use the toolkit realSync()  method instead:
>   SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
>   ...
>   toolkit.realSync();
>
>   Thanks,
>   Alexandr.
>
>
> On 10/31/2012 1:58 PM, Konstantin Shefov wrote:
>> On 30-Oct-12 16:43, Anthony Petrov wrote:
>>> Looks fine to me.
>>>
>>> -- 
>>> best regards,
>>> Anthony
>>>
>>> On 10/30/2012 3:51 PM, Konstantin Shefov wrote:
>>>> Hello,
>>>>
>>>> Please review a fix for the issue:
>>>>
>>>> 7147408 [macosx] Add autodelay to fix a regression test
>>>>
>>>> The webrev is http://cr.openjdk.java.net/~kshefov/7147408/webrev/
>>>>
>>>> It is suggested to move the test to open jdk.
>>>>
>>>> Thanks,
>>>> Konstantin
>>>>
>




More information about the awt-dev mailing list