From dbb71995c8490253b2a2ac6e06e75b324e69906d Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 22 Aug 2017 16:03:01 +0100 Subject: [PATCH] JAL-2680 remove all mappings in test teardown --- test/jalview/io/FeaturesFileTest.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/test/jalview/io/FeaturesFileTest.java b/test/jalview/io/FeaturesFileTest.java index 3b688db..152ab84 100644 --- a/test/jalview/io/FeaturesFileTest.java +++ b/test/jalview/io/FeaturesFileTest.java @@ -34,7 +34,9 @@ import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; import jalview.datamodel.features.SequenceFeatures; import jalview.gui.AlignFrame; +import jalview.gui.Desktop; import jalview.gui.JvOptionPane; +import jalview.structure.StructureSelectionManager; import java.awt.Color; import java.io.File; @@ -45,11 +47,24 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; public class FeaturesFileTest { + private static String simpleGffFile = "examples/testdata/simpleGff3.gff"; + + @AfterClass(alwaysRun = true) + public void tearDownAfterClass() + { + /* + * remove any sequence mappings created so they don't pollute other tests + */ + StructureSelectionManager ssm = StructureSelectionManager + .getStructureSelectionManager(Desktop.instance); + ssm.resetAll(); + } @BeforeClass(alwaysRun = true) public void setUpJvOptionPane() @@ -58,8 +73,6 @@ public class FeaturesFileTest JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); } - private static String simpleGffFile = "examples/testdata/simpleGff3.gff"; - @Test(groups = { "Functional" }) public void testParse() throws Exception { -- 1.7.10.2