JDK7 Support

I have just commit a change to make abbot compile and run against JDK 7, there are about ten more test failures on JDK7u1 compared with JDK6u30 so obviously we would need to resolve some of these. Mostly in the area of tree controls.

If you want to try it out check out the tip of the SVN repository and run the all ant target.

* Added assertCellExists to JTableTester * Removed old JPEG API's so that the code now compiles properly under JDK 7 3452425 * Added a test to cover long string case in bug 3441059 * Replace sun.awt code in EventDispatchExceptionHandler with more modern Thread.setUncaught... bug 3441725

/** Returns when the most recent exception was caught on the dispatch thread, or -1 if none has been thrown or the exception has been cleared. */- public synchronized static long getThrowableTime() {- return when;+ public static long getThrowableTime() {+ synchronized (synchronizedBlock)+ {+ return when;+ } }

-/** Handler for uncaught exceptions on any event dispatch thread.- Once this has been installed, the class must be accessible by any- subsequently launched dispatch thread.<p>+import java.lang.reflect.InvocationTargetException;

- This handler is installed by setting the System property- sun.awt.exception.handler. See javadoc for java.awt.EventDispatchThread- for details. This is sort of a patch to Sun's implementation, which only- checks the property once and caches the result ever after. This- implementation will always chain to the handler indicated by the current- value of the property.<p>+import java.security.AccessController;+import java.security.PrivilegedAction;

- It is most definitely NOT safe to try to install several of these on- different threads.+import java.util.concurrent.CountDownLatch;+import java.util.concurrent.TimeUnit;++/** + * Handler for uncaught exceptions on any event dispatch thread.<p>+ * It now uses the Thread.UncaughtExceptionHandler class which introduces+ * a minor issue in that when this is called the current event queue object+ * has already been replaced by a new instance. (See the source code for+ * { <at> link java.awt.EventDispatchThread#run} for more information). To work around+ * this a shared synchronization object has been added, although a read/write lock+ * would also have been a possible design and should be considered if a time out+ * ends up being required. */ public class EventDispatchExceptionHandler {- /** See javadoc for java.awt.EventDispatchThread. */- public static final String PROP_NAME = "sun.awt.exception.handler";

private static boolean installed = false; private static boolean canInstall = true;+ /**+ * Allows sychronization between the current queue and the exception handler+ * queue of which the only thing we know for sure is that it is definitely not+ * the AWT event queue, if it ever was.+ */+ private static CountDownLatch instalLatch = new CountDownLatch(1);+ + /**+ * We need to make sure that we can't query the state of the hander while we are dealing with an exception+ */+ protected static Object synchronizedBlock = new Object() {};+ + private static Thread.UncaughtExceptionHandler existingHandler;

- /** Install a handler for event dispatch exceptions. This is kind- of a hack, but it's Sun's hack.- See the javadoc for java.awt.EventDispatchThread for details.- NOTE: we throw an exception immediately, which - ensures that our handler is installed, since otherwise - someone might set this property later.- java.awt.EventDispatchThread doesn't actually load the handler- specified by the property until an exception is caught by the- event dispatch thread. SwingSet2 in 1.4.1 installs its own.- Note that a new instance is created for each exception thrown.+ public void install() {

- <at> throws RuntimeException if the handler cannot be installed.- <at> throws IllegalStateException if this method is invoked from an event- dispatch thread. - <at> throws IllegalArgumentException if the given class is not derived- from this one. -- // TODO: read the private static field- // String EventDispatchThread.handlerClassName and override it if- // necessary.- */- public void install() { if (SwingUtilities.isEventDispatchThread()) { throw new IllegalStateException("Handler must not be installed from the event dispatch thread"); }

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

------------------------------------------------------------------------------Learn Windows Azure Live! Tuesday, Dec 13, 2011Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure_______________________________________________abbot-commits mailing listabbot-commits <at> lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/abbot-commits

------------------------------------------------------------------------------
Learn Windows Azure Live! Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for
developers. It will provide a great way to learn Windows Azure and what it
provides. You can attend the event by watching it streamed LIVE online.
Learn more at http://p.sf.net/sfu/ms-windowsazure

About the usage of the abbot.

xiaokun <xiaokunhou <at> gmail.com>
2011-12-27 05:50:45 GMT

hi all,

I am new to abbot.

I wonder if i could start two or more jars at one time with the costello. Because in some cases, i must do some other operations with other to be tested tools. Or i may use another tool to check whether i works after the main task.

And just though to add classpaths to make it work or something else? but how to deal with the main method?

Also i want to know the usage of checkbow "threaded lunch".

May u can describe it steply, It will be helpful.

Thank you!

ps: The document about the abbot is so limitted. what a pity.

Best Regards.

Sean

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev

Can't find the class ScriptTestSuite!!

xiaokun <xiaokunhou <at> gmail.com>
2011-12-31 06:13:48 GMT

hi all,

I added the abbot.jar to the library. But why I can't use the class ScriptTestSuite?

Best Regards,

Sean

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox

Re: Can't find the class ScriptTestSuite!!

I added the abbot.jar to the library. But why I can't use the class ScriptTestSuite?

Best Regards,

Sean

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox