JAL-629 teardown in CommandsTest
authorBen Soares <b.soares@dundee.ac.uk>
Mon, 13 Mar 2023 19:52:26 +0000 (19:52 +0000)
committerBen Soares <b.soares@dundee.ac.uk>
Mon, 13 Mar 2023 19:52:26 +0000 (19:52 +0000)
test/jalview/bin/CommandsTest.java

index 9c763e1..bd67ded 100644 (file)
@@ -3,6 +3,7 @@ package jalview.bin;
 import java.util.Date;
 
 import org.testng.Assert;
+import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -30,6 +31,12 @@ public class CommandsTest
     JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
   }
 
+  @AfterMethod(alwaysRun = true)
+  public void tearDown()
+  {
+    Desktop.instance.closeAll_actionPerformed(null);
+  }
+
   @Test(groups = "Functional", dataProvider = "cmdLines")
   public void commandsOpenTest(String cmdLine, String sequence)
   {