From cbc07eab0291f023f89b2554c488ae9e4587ae2a Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 21 Jun 2016 14:45:56 +0100 Subject: [PATCH] JAL-1270 ensure before/after clauses have at least alwaysRun=true in them --- test/jalview/datamodel/PDBEntryTest.java | 2 +- test/jalview/ext/ensembl/EnsemblCdnaTest.java | 4 ++-- test/jalview/ext/ensembl/EnsemblCdsTest.java | 4 ++-- test/jalview/ext/ensembl/EnsemblGeneTest.java | 4 ++-- test/jalview/ext/ensembl/EnsemblGenomeTest.java | 4 ++-- test/jalview/ext/ensembl/EnsemblSeqProxyTest.java | 8 ++------ test/jalview/ext/jmol/JmolViewerTest.java | 2 +- test/jalview/ext/rbvi/chimera/JalviewChimeraView.java | 2 +- test/jalview/ext/so/SequenceOntologyTest.java | 5 ++--- test/jalview/fts/service/pdb/PDBFTSPanelTest.java | 4 +--- test/jalview/fts/service/pdb/PDBFTSRestClientTest.java | 2 +- test/jalview/gui/JAL1353bugdemo.java | 2 +- test/jalview/gui/PaintRefresherTest.java | 2 +- test/jalview/gui/StructureChooserTest.java | 2 +- test/jalview/io/AnnotatedPDBFileInputTest.java | 2 +- test/jalview/io/FileIOTester.java | 2 +- test/jalview/io/JSONFileTest.java | 2 +- test/jalview/io/Jalview2xmlTests.java | 2 +- test/jalview/io/JalviewExportPropertiesTests.java | 2 +- test/jalview/io/NewickFileTests.java | 2 +- test/jalview/io/RNAMLfileTest.java | 2 +- test/jalview/ws/jabaws/JalviewJabawsTestUtils.java | 2 +- test/jalview/ws/jabaws/JpredJabaStructExportImport.java | 2 +- test/jalview/ws/jabaws/RNAStructExportImport.java | 2 +- test/jalview/ws/seqfetcher/DbRefFetcherTest.java | 2 +- 25 files changed, 31 insertions(+), 38 deletions(-) diff --git a/test/jalview/datamodel/PDBEntryTest.java b/test/jalview/datamodel/PDBEntryTest.java index 8a3b925..42bb091 100644 --- a/test/jalview/datamodel/PDBEntryTest.java +++ b/test/jalview/datamodel/PDBEntryTest.java @@ -34,7 +34,7 @@ public class PDBEntryTest { } - @AfterMethod + @AfterMethod(alwaysRun = true) public void tearDown() throws Exception { } diff --git a/test/jalview/ext/ensembl/EnsemblCdnaTest.java b/test/jalview/ext/ensembl/EnsemblCdnaTest.java index 90c38d4..fb7e143 100644 --- a/test/jalview/ext/ensembl/EnsemblCdnaTest.java +++ b/test/jalview/ext/ensembl/EnsemblCdnaTest.java @@ -21,13 +21,13 @@ import org.testng.annotations.Test; public class EnsemblCdnaTest { - @BeforeClass + @BeforeClass(alwaysRun = true) public void setUp() { SequenceOntologyFactory.setInstance(new SequenceOntologyLite()); } - @AfterClass + @AfterClass(alwaysRun = true) public void tearDown() { SequenceOntologyFactory.setInstance(null); diff --git a/test/jalview/ext/ensembl/EnsemblCdsTest.java b/test/jalview/ext/ensembl/EnsemblCdsTest.java index 183f933..5344575 100644 --- a/test/jalview/ext/ensembl/EnsemblCdsTest.java +++ b/test/jalview/ext/ensembl/EnsemblCdsTest.java @@ -20,13 +20,13 @@ import org.testng.annotations.Test; public class EnsemblCdsTest { - @BeforeClass + @BeforeClass(alwaysRun = true) public void setUp() { SequenceOntologyFactory.setInstance(new SequenceOntologyLite()); } - @AfterClass + @AfterClass(alwaysRun = true) public void tearDown() { SequenceOntologyFactory.setInstance(null); diff --git a/test/jalview/ext/ensembl/EnsemblGeneTest.java b/test/jalview/ext/ensembl/EnsemblGeneTest.java index 5cf296c..4e815d1 100644 --- a/test/jalview/ext/ensembl/EnsemblGeneTest.java +++ b/test/jalview/ext/ensembl/EnsemblGeneTest.java @@ -22,13 +22,13 @@ import org.testng.annotations.Test; public class EnsemblGeneTest { - @BeforeClass + @BeforeClass(alwaysRun = true) public void setUp() { SequenceOntologyFactory.setInstance(new SequenceOntologyLite()); } - @AfterClass + @AfterClass(alwaysRun = true) public void tearDown() { SequenceOntologyFactory.setInstance(null); diff --git a/test/jalview/ext/ensembl/EnsemblGenomeTest.java b/test/jalview/ext/ensembl/EnsemblGenomeTest.java index daad8b1..c711279 100644 --- a/test/jalview/ext/ensembl/EnsemblGenomeTest.java +++ b/test/jalview/ext/ensembl/EnsemblGenomeTest.java @@ -19,13 +19,13 @@ import org.testng.annotations.Test; public class EnsemblGenomeTest { - @BeforeClass + @BeforeClass(alwaysRun = true) public void setUp() { SequenceOntologyFactory.setInstance(new SequenceOntologyLite()); } - @AfterClass + @AfterClass(alwaysRun = true) public void tearDown() { SequenceOntologyFactory.setInstance(null); diff --git a/test/jalview/ext/ensembl/EnsemblSeqProxyTest.java b/test/jalview/ext/ensembl/EnsemblSeqProxyTest.java index 6ce8a3b..2d3948f 100644 --- a/test/jalview/ext/ensembl/EnsemblSeqProxyTest.java +++ b/test/jalview/ext/ensembl/EnsemblSeqProxyTest.java @@ -6,7 +6,6 @@ import static org.testng.AssertJUnit.assertTrue; import static org.testng.internal.junit.ArrayAsserts.assertArrayEquals; import jalview.datamodel.Alignment; -import jalview.datamodel.AlignmentI; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; import jalview.io.AppletFormatAdapter; @@ -16,10 +15,7 @@ import jalview.io.gff.SequenceOntologyFactory; import jalview.io.gff.SequenceOntologyLite; import java.lang.reflect.Method; -import java.net.MalformedURLException; -import java.net.URL; import java.util.Arrays; -import java.util.List; import org.testng.Assert; import org.testng.annotations.AfterClass; @@ -109,13 +105,13 @@ public class EnsemblSeqProxyTest + "NRDQIIFMVGRGYLSPDLSKVRSNCPKAMKRLMAECLKKKRDERPLFPQILASIELLARS\n" + "LPKIHRSASEPSLNRAGFQTEDFSLYACASPKTPIQAGGYGAFPVH" } }; - @BeforeClass + @BeforeClass(alwaysRun = true) public void setUp() { SequenceOntologyFactory.setInstance(new SequenceOntologyLite()); } - @AfterClass + @AfterClass(alwaysRun = true) public void tearDown() { SequenceOntologyFactory.setInstance(null); diff --git a/test/jalview/ext/jmol/JmolViewerTest.java b/test/jalview/ext/jmol/JmolViewerTest.java index c9b2980..10224fa 100644 --- a/test/jalview/ext/jmol/JmolViewerTest.java +++ b/test/jalview/ext/jmol/JmolViewerTest.java @@ -53,7 +53,7 @@ public class JmolViewerTest /** * @throws java.lang.Exception */ - @AfterClass + @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { jalview.gui.Desktop.instance.closeAll_actionPerformed(null); diff --git a/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java b/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java index cd28a2b..93a98b8 100644 --- a/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java +++ b/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java @@ -54,7 +54,7 @@ public class JalviewChimeraView /** * @throws java.lang.Exception */ - @AfterClass + @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { jalview.gui.Desktop.instance.closeAll_actionPerformed(null); diff --git a/test/jalview/ext/so/SequenceOntologyTest.java b/test/jalview/ext/so/SequenceOntologyTest.java index be07485..1ebc42c 100644 --- a/test/jalview/ext/so/SequenceOntologyTest.java +++ b/test/jalview/ext/so/SequenceOntologyTest.java @@ -3,7 +3,6 @@ package jalview.ext.so; import static org.testng.AssertJUnit.assertFalse; import static org.testng.AssertJUnit.assertTrue; -import jalview.ext.so.SequenceOntology; import jalview.io.gff.SequenceOntologyFactory; import jalview.io.gff.SequenceOntologyI; @@ -15,7 +14,7 @@ public class SequenceOntologyTest { private SequenceOntologyI so; - @BeforeClass + @BeforeClass(alwaysRun = true) public void setUp() { long now = System.currentTimeMillis(); SequenceOntologyFactory.setInstance(new SequenceOntology()); @@ -25,7 +24,7 @@ public class SequenceOntologyTest so = SequenceOntologyFactory.getInstance(); } - @AfterClass + @AfterClass(alwaysRun = true) public void tearDown() { SequenceOntologyFactory.setInstance(null); diff --git a/test/jalview/fts/service/pdb/PDBFTSPanelTest.java b/test/jalview/fts/service/pdb/PDBFTSPanelTest.java index ac1d304..69792bb 100644 --- a/test/jalview/fts/service/pdb/PDBFTSPanelTest.java +++ b/test/jalview/fts/service/pdb/PDBFTSPanelTest.java @@ -23,8 +23,6 @@ package jalview.fts.service.pdb; import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertTrue; -import jalview.fts.service.pdb.PDBFTSPanel; - import javax.swing.JInternalFrame; import javax.swing.JTextField; @@ -40,7 +38,7 @@ public class PDBFTSPanelTest { } - @AfterMethod + @AfterMethod(alwaysRun = true) public void tearDown() throws Exception { } diff --git a/test/jalview/fts/service/pdb/PDBFTSRestClientTest.java b/test/jalview/fts/service/pdb/PDBFTSRestClientTest.java index ebc0405..ed248bb 100644 --- a/test/jalview/fts/service/pdb/PDBFTSRestClientTest.java +++ b/test/jalview/fts/service/pdb/PDBFTSRestClientTest.java @@ -59,7 +59,7 @@ public class PDBFTSRestClientTest { } - @AfterMethod + @AfterMethod(alwaysRun = true) public void tearDown() throws Exception { } diff --git a/test/jalview/gui/JAL1353bugdemo.java b/test/jalview/gui/JAL1353bugdemo.java index ff8c179..9d0cedb 100644 --- a/test/jalview/gui/JAL1353bugdemo.java +++ b/test/jalview/gui/JAL1353bugdemo.java @@ -47,7 +47,7 @@ public class JAL1353bugdemo { } - @AfterClass + @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { } diff --git a/test/jalview/gui/PaintRefresherTest.java b/test/jalview/gui/PaintRefresherTest.java index 52eadcb..212bcce 100644 --- a/test/jalview/gui/PaintRefresherTest.java +++ b/test/jalview/gui/PaintRefresherTest.java @@ -48,7 +48,7 @@ public class PaintRefresherTest PaintRefresher.components.clear(); } - @AfterMethod + @AfterMethod(alwaysRun = true) public void tearDown() { PaintRefresher.components.clear(); diff --git a/test/jalview/gui/StructureChooserTest.java b/test/jalview/gui/StructureChooserTest.java index ae6bf38..da2cde5 100644 --- a/test/jalview/gui/StructureChooserTest.java +++ b/test/jalview/gui/StructureChooserTest.java @@ -60,7 +60,7 @@ public class StructureChooserTest seq.setPDBId(pdbIds); } - @AfterMethod + @AfterMethod(alwaysRun = true) public void tearDown() throws Exception { seq = null; diff --git a/test/jalview/io/AnnotatedPDBFileInputTest.java b/test/jalview/io/AnnotatedPDBFileInputTest.java index c472576..62d76a2 100644 --- a/test/jalview/io/AnnotatedPDBFileInputTest.java +++ b/test/jalview/io/AnnotatedPDBFileInputTest.java @@ -180,7 +180,7 @@ public class AnnotatedPDBFileInputTest /** * @throws java.lang.Exception */ - @AfterClass + @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { jalview.gui.Desktop.instance.closeAll_actionPerformed(null); diff --git a/test/jalview/io/FileIOTester.java b/test/jalview/io/FileIOTester.java index cde1cbc..2eb3703 100644 --- a/test/jalview/io/FileIOTester.java +++ b/test/jalview/io/FileIOTester.java @@ -46,7 +46,7 @@ public class FileIOTester /** * @throws java.lang.Exception */ - @AfterClass + @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { } diff --git a/test/jalview/io/JSONFileTest.java b/test/jalview/io/JSONFileTest.java index d327134..93fb12b 100644 --- a/test/jalview/io/JSONFileTest.java +++ b/test/jalview/io/JSONFileTest.java @@ -262,7 +262,7 @@ public class JSONFileTest passedCount = 0; } - @AfterTest + @AfterTest(alwaysRun = true) public void tearDown() throws Exception { testJsonFile = null; diff --git a/test/jalview/io/Jalview2xmlTests.java b/test/jalview/io/Jalview2xmlTests.java index b45cd2a..00d4ee0 100644 --- a/test/jalview/io/Jalview2xmlTests.java +++ b/test/jalview/io/Jalview2xmlTests.java @@ -62,7 +62,7 @@ public class Jalview2xmlTests /** * @throws java.lang.Exception */ - @AfterClass + @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { jalview.gui.Desktop.instance.closeAll_actionPerformed(null); diff --git a/test/jalview/io/JalviewExportPropertiesTests.java b/test/jalview/io/JalviewExportPropertiesTests.java index ab3d9df..164c259 100644 --- a/test/jalview/io/JalviewExportPropertiesTests.java +++ b/test/jalview/io/JalviewExportPropertiesTests.java @@ -52,7 +52,7 @@ public class JalviewExportPropertiesTests /** * @throws java.lang.Exception */ - @AfterClass + @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { jalview.gui.Desktop.instance.closeAll_actionPerformed(null); diff --git a/test/jalview/io/NewickFileTests.java b/test/jalview/io/NewickFileTests.java index d8e21c4..f89f58b 100644 --- a/test/jalview/io/NewickFileTests.java +++ b/test/jalview/io/NewickFileTests.java @@ -172,7 +172,7 @@ public class NewickFileTests /** * @throws java.lang.Exception */ - @AfterClass + @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { } diff --git a/test/jalview/io/RNAMLfileTest.java b/test/jalview/io/RNAMLfileTest.java index d41446b..c084792 100644 --- a/test/jalview/io/RNAMLfileTest.java +++ b/test/jalview/io/RNAMLfileTest.java @@ -34,7 +34,7 @@ public class RNAMLfileTest { } - @AfterClass + @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { } diff --git a/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java b/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java index 46feebc..4550fe8 100644 --- a/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java +++ b/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java @@ -37,7 +37,7 @@ public class JalviewJabawsTestUtils { } - @AfterClass + @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { } diff --git a/test/jalview/ws/jabaws/JpredJabaStructExportImport.java b/test/jalview/ws/jabaws/JpredJabaStructExportImport.java index afb24c4..9398d18 100644 --- a/test/jalview/ws/jabaws/JpredJabaStructExportImport.java +++ b/test/jalview/ws/jabaws/JpredJabaStructExportImport.java @@ -84,7 +84,7 @@ public class JpredJabaStructExportImport assertNotNull("Couldn't load test data ('" + testseqs + "')", af); } - @AfterClass + @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { if (af != null) diff --git a/test/jalview/ws/jabaws/RNAStructExportImport.java b/test/jalview/ws/jabaws/RNAStructExportImport.java index b57e5d0..24578f1 100644 --- a/test/jalview/ws/jabaws/RNAStructExportImport.java +++ b/test/jalview/ws/jabaws/RNAStructExportImport.java @@ -108,7 +108,7 @@ public class RNAStructExportImport // public? } - @AfterClass + @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { if (af != null) diff --git a/test/jalview/ws/seqfetcher/DbRefFetcherTest.java b/test/jalview/ws/seqfetcher/DbRefFetcherTest.java index 63b1b9c..341d9ef 100644 --- a/test/jalview/ws/seqfetcher/DbRefFetcherTest.java +++ b/test/jalview/ws/seqfetcher/DbRefFetcherTest.java @@ -62,7 +62,7 @@ public class DbRefFetcherTest /** * @throws java.lang.Exception */ - @AfterClass + @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { } -- 1.7.10.2