JAL-1270 added runAlways=true to setUp method
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 21 Jun 2016 13:41:43 +0000 (14:41 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 21 Jun 2016 13:41:43 +0000 (14:41 +0100)
test/jalview/ext/so/SequenceOntologyTest.java

index be07485..ea92e3c 100644 (file)
@@ -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")