X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fws%2Fjabaws%2FRNAStructExportImport.java;h=ee07335b84b7eec22aa40a505410fbae1cd65034;hb=7692386ccfe778075dd83a753d30a7a27fe507be;hp=f1430f673a50f64c60d830051928aee94ba94e97;hpb=95ebbef7b78bf266a8252bd479510be3c80cd234;p=jalview.git diff --git a/test/jalview/ws/jabaws/RNAStructExportImport.java b/test/jalview/ws/jabaws/RNAStructExportImport.java index f1430f6..ee07335 100644 --- a/test/jalview/ws/jabaws/RNAStructExportImport.java +++ b/test/jalview/ws/jabaws/RNAStructExportImport.java @@ -55,6 +55,11 @@ import org.testng.annotations.Test; import compbio.metadata.Argument; import compbio.metadata.WrongParameterException; +/* + * All methods in this class are set to the Network group because setUpBeforeClass will fail + * if there is no network. + */ +@Test(singleThreaded = true) public class RNAStructExportImport { @@ -84,10 +89,16 @@ public class RNAStructExportImport Cache.initLogger(); disc = JalviewJabawsTestUtils.getJabawsDiscoverer(false); + while (disc.isRunning()) + { + // don't get services until discoverer has finished + Thread.sleep(100); + } + for (Jws2Instance svc : disc.getServices()) { - if (svc.getServiceTypeURI().toLowerCase().contains("rnaalifoldws")) + if (svc.getNameURI().toLowerCase().contains("rnaalifoldws")) { rnaalifoldws = svc; } @@ -107,7 +118,7 @@ public class RNAStructExportImport assertNotNull("Couldn't load test data ('" + testseqs + "')", af); // remove any existing annotation - List aal = new ArrayList(); + List aal = new ArrayList<>(); for (AlignmentAnnotation rna : af.getViewport().getAlignment() .getAlignmentAnnotation()) { @@ -139,7 +150,7 @@ public class RNAStructExportImport } } - @Test(groups = { "Functional" }) + @Test(groups = { "Network" }) public void testRNAAliFoldValidStructure() { @@ -172,7 +183,7 @@ public class RNAStructExportImport } } - @Test(groups = { "Functional" }) + @Test(groups = { "Network" }) public void testRNAStructExport() { @@ -191,12 +202,14 @@ public class RNAStructExportImport } while (af.getViewport().getCalcManager().isWorking()); AlignmentI orig_alig = af.getViewport().getAlignment(); - - testAnnotationFileIO("Testing RNAalifold Annotation IO", orig_alig); + // JBPNote: this assert fails (2.10.2) because the 'Reference Positions' + // annotation is mistakenly recognised as an RNA annotation row when read in + // as an annotation file. + verifyAnnotationFileIO("Testing RNAalifold Annotation IO", orig_alig); } - public static void testAnnotationFileIO(String testname, AlignmentI al) + static void verifyAnnotationFileIO(String testname, AlignmentI al) { try { @@ -231,7 +244,8 @@ public class RNAStructExportImport DataSourceType.PASTE)); // test for consistency in io - StockholmFileTest.testAlignmentEquivalence(al, al_new, false); + StockholmFileTest.testAlignmentEquivalence(al, al_new, false, false, + false); return; } catch (Exception e) { @@ -242,10 +256,10 @@ public class RNAStructExportImport + "\nCouldn't complete Annotation file roundtrip input/output/input test."); } - @Test(groups = { "Functional" }) + @Test(groups = { "Network" }) public void testRnaalifoldSettingsRecovery() { - List opts = new ArrayList(); + List opts = new ArrayList<>(); for (Argument rg : (List) rnaalifoldws.getRunnerConfig() .getArguments()) {