JAL-4195 tidy up desktop instances after creating them
[jalview.git] / test / jalview / bin / CommandsTest2.java
index 0a47700..0c2071a 100644 (file)
@@ -51,8 +51,7 @@ public class CommandsTest2
   @AfterMethod(alwaysRun = true)
   public void tearDown()
   {
-    if (Desktop.instance != null)
-      Desktop.instance.closeAll_actionPerformed(null);
+    Desktop.closeDesktop();
   }
 
   @Test(
@@ -65,7 +64,7 @@ public class CommandsTest2
   {
     String[] args = cmdLine.split("\\s+");
 
-    Jalview.main(args);
+    CommandsTest.callJalviewMain(args);
     try
     {
       // sleep for slow build server to open annotations and viewer windows