From b7c6d607f01894cf7e4223dc80ed0fa50d581276 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 21 Jun 2016 14:41:43 +0100 Subject: [PATCH] JAL-1270 added runAlways=true to setUp method --- test/jalview/ext/so/SequenceOntologyTest.java | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) 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") -- 1.7.10.2