[rfc][icedtea-web] closing listener idea

Adam Domurad adomurad at redhat.com
Tue Aug 14 08:50:42 PDT 2012


On Tue, 2012-08-14 at 17:06 +0200, Jiri Vanek wrote:
> This idea should speed up browser tests a lot. When all conditions for pass/failure are done, browser is terminated and is not waiting for time-out any more.
> It is bringing some more load to tester, but its usage is mandatory.
Thanks very much for the ideas!

It would have been nice if it were like this from the beginning - but
nevertheless this would be a great improvement.

I'm 100% for converting all tests to this form, and mandating it for
future applet tests. I'm sure as the most frequent runner of the test
suite you can agree, at least for mandating it for future tests :)

> 
> Usage here is demonstrated on simple applet test.
> Any ideas (especially how to avoid doubled "contains" or "matches") welcomed.
> 
> J.
> 
> * tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java: Integrated ClosingListener speed-up.
> * tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java: New file, interface for all ClosingListeners.
> * tests/test-extensions/net/sourceforge/jnlp/CountingClosingListener.java: Implementation of ClsoingListeners which is storing copy of complete output of program.
> * tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java: added (setTimeout) method as cleanest possibility to terminate process immediately
> * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: new method (setUpClosingListener) for setting necessary variables in ClosingListener

This method is nice enough, although is it possible to have a
standardized way to see if an exception has caused the applet to stop ? 

I'm very much in favour of adding a clear end marker to the end of tests
rather than duplicating contains/matches. If you don't like a hardcoded
ending message, then, what if we had a closing listener implementation
that takes a single string as an argument, and a string is printed at
the end of the applet. Custom closing listeners could always also be
created. 




More information about the distro-pkg-dev mailing list