From: gmungoc Date: Tue, 21 Jun 2016 13:41:43 +0000 (+0100) Subject: JAL-1270 added runAlways=true to setUp method X-Git-Tag: Release_2_10_0~161^2^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b7c6d607f01894cf7e4223dc80ed0fa50d581276;p=jalview.git JAL-1270 added runAlways=true to setUp method --- diff --git a/test/jalview/ext/so/SequenceOntologyTest.java b/test/jalview/ext/so/SequenceOntologyTest.java index be07485..ea92e3c 100644 --- a/test/jalview/ext/so/SequenceOntologyTest.java +++ b/test/jalview/ext/so/SequenceOntologyTest.java @@ -3,11 +3,8 @@ 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; -import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -15,20 +12,20 @@ public class SequenceOntologyTest { private SequenceOntologyI so; - @BeforeClass + @BeforeClass(alwaysRun = true) public void setUp() { long now = System.currentTimeMillis(); - SequenceOntologyFactory.setInstance(new SequenceOntology()); + try + { + so = new SequenceOntology(); + } catch (Throwable t) + { + System.out.println("SOTest error "); + t.printStackTrace(System.err); + } long elapsed = System.currentTimeMillis() - now; System.out.println("Load and cache of Sequence Ontology took " + elapsed + "ms"); - so = SequenceOntologyFactory.getInstance(); - } - - @AfterClass - public void tearDown() - { - SequenceOntologyFactory.setInstance(null); } @Test(groups = "Functional")