8 Oct 2008 16:00
Re: Appplet abbot.ExitException
Javan Wardle <Javan.Wardle <at> roidistribution.com>
2008-10-08 14:00:28 GMT
2008-10-08 14:00:28 GMT
Thank you Timothy
I do not explicitly call System.exit from within the applet. It appears
that the abbot.ScriptFixture or AppletViewer calls System.exit when
abbot script is complete. Are you suggesting I change the security model
to block System.exit and avoid the exception?
Regards, Javan
-----Original Message-----
From: Timothy Wall [mailto:twall <at> users.sourceforge.net]
Sent: 08 October 2008 13:41
To: Javan Wardle
Cc: abbot-users <at> lists.sourceforge.net
Subject: Re: [abbot-users] Appplet abbot.ExitException
As you suggest, making the applet *not* call System.exit will avoid
the exception.
On Oct 6, 2008, at 7:59 PM, Javan Wardle wrote:
> Hi
> I've recorded a Costello script against an applet and it runs fine.
> However, working in eclipse, I set up a test suite which does some
> arbitrary stuff, then runs a script, then does some more arbitrary
> stuff.
>
> package functional;
>
> import junit.framework.Test;
> import junit.framework.TestSuite;
> import junit.extensions.abbot.ScriptFixture;
>
> public class AllTests {
>
> public static Test suite() {
> TestSuite testSuite = new TestSuite("Test for Costello
> scripts then Model check");
> //$JUnit-BEGIN$
> testSuite.addTestSuite(ModelReset.class);
> testSuite.addTest(new ScriptFixture("../../../temp/
> func_1.script"));
> testSuite.addTestSuite(ModelTest.class);
> //$JUnit-END$
> return testSuite;
> }
> }
>
> My challenge is that at the end of the script, an exit exception is
> thrown and stops the test suite. Any ideas on how to stop or catch
> the exception? If needs be, the applet need not exit - I can tidy up
> manually when the tests are finished.
>
> Exception in thread "Thread-27" abbot.ExitException: Applet
> System.exit disallowed on Thread[Thread-27,4,file:/C:/SRC/java/
> positionoptions/bin/-threadGroup] (0) on Thread[Thread-27,4,file:/C:/
> SRC/java/positionoptions/bin/-threadGroup]
> at
> abbot
> .script.AppletSecurityManager.checkExit(AppletSecurityManager.java:45)
> at java.lang.Runtime.exit(Unknown Source)
> at java.lang.System.exit(Unknown Source)
> at sun.applet.AppletViewer.appletSystemExit(Unknown Source)
> at sun.applet.AppletViewer.access$400(Unknown Source)
> at sun.applet.AppletViewer$4.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
>
------------------------------------------------------------------------
-
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in
> the world
>
http://moblin-contest.org/redirect.php?banner_id=100&url=/______________
_________________________________
> abbot-users mailing list
> abbot-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/abbot-users
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
RSS Feed