import java.io.File;
import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
import java.nio.file.Files;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
+import javax.swing.SwingUtilities;
+
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
}
@AfterMethod(alwaysRun = true)
- public void tearDown()
+ public void tearDown()
{
- Desktop.closeDesktop();
+ try
+ {
+ // occasionally we are blocked by Jmol redraws
+ SwingUtilities.invokeAndWait(new Runnable()
+ {
+
+ @Override
+ public void run()
+ {
+ Desktop.closeDesktop();
+ }
+ });
+ } catch (Exception foo)
+ {
+ System.err.println("Failed during teardown with exception");
+ foo.printStackTrace();
+ }
+
}
public static void callJalviewMain(String[] args)