svn commit: r18247 - trunk/src/argouml-app/tests/org/argouml/ui/TestDetailsPane.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2010-04-13 01:59:29-0700
New Revision: 18247

Modified:
   trunk/src/argouml-app/tests/org/argouml/ui/TestDetailsPane.java

Log:
Run test on AWT event thread so Swing doesn't deadlock

Modified: trunk/src/argouml-app/tests/org/argouml/ui/TestDetailsPane.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/tests/org/argouml/ui/TestDetailsPane.java?view=diff&pathrev=18247&r1=18246&r2=18247
==============================================================================
--- trunk/src/argouml-app/tests/org/argouml/ui/TestDetailsPane.java	(original)
+++ trunk/src/argouml-app/tests/org/argouml/ui/TestDetailsPane.java	2010-04-13 01:59:29-0700
@@ -39,6 +39,7 @@
 package org.argouml.ui;
 
 import javax.swing.JPanel;
+import javax.swing.SwingUtilities;
 
 import junit.framework.TestCase;
 
@@ -98,7 +99,18 @@
     /**
      * Test setting a target.
      */
-    public void testTargetSet() {
+    public void testTargetSet() throws Exception {
+        // Make sure this test happens on the AWT event thread
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                intTestTargetSet();
+            }});
+    }
+    
+    /**
+     * Test setting a target.
+     */
+    public void intTestTargetSet() {
         DetailsPane pane = new DetailsPane("South", Horizontal.getInstance());
         for (AbstractArgoJPanel tab : new InitUmlUI().getDetailsTabs()) {
             pane.addTab(tab, false);

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2580581

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.