From: Jim Procter Date: Mon, 7 Oct 2019 08:03:56 +0000 (+0100) Subject: JAL-3070 jaba/slivka independent tests for disorder and AACon services X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1d92c8f6386868dd1a217876ea85f44e149087d1;p=jalview.git JAL-3070 jaba/slivka independent tests for disorder and AACon services --- diff --git a/test/jalview/ws/jabaws/AAConAnnotAndSettingsIO.java b/test/jalview/ws/jabaws/AAConAnnotAndSettingsIO.java index 02d0d82..2a6c3d0 100644 --- a/test/jalview/ws/jabaws/AAConAnnotAndSettingsIO.java +++ b/test/jalview/ws/jabaws/AAConAnnotAndSettingsIO.java @@ -162,7 +162,7 @@ public class AAConAnnotAndSettingsIO SeqAnnotationServiceCalcWorker aaconClient = new SeqAnnotationServiceCalcWorker( aacon, af, null, null); - long current = System.currentTimeMillis(), limit = 5; + long current = System.currentTimeMillis(), limit = 15; af.getViewport().getCalcManager().startWorker(aaconClient); do { @@ -180,8 +180,12 @@ public class AAConAnnotAndSettingsIO } while (af.getViewport().getCalcManager().isWorking()); AlignmentI orig_alig = af.getViewport().getAlignment(); boolean foundShenkin = false; - for (AlignmentAnnotation aa : orig_alig - .findAnnotation(aacon.getAlignAnalysisUI().getCalcId())) + Iterable _aa=orig_alig + .findAnnotation(aacon.getAlignAnalysisUI().getCalcId()); + assertTrue("No annotation from service", + _aa != null && _aa.iterator().hasNext()); + + for (AlignmentAnnotation aa : _aa) { assertTrue("AACon annotation not marked as autocalculated!", aa.autoCalculated); diff --git a/test/jalview/ws/jabaws/DisorderAnnotExportImport.java b/test/jalview/ws/jabaws/DisorderAnnotExportImport.java index 025c913..8454e03 100644 --- a/test/jalview/ws/jabaws/DisorderAnnotExportImport.java +++ b/test/jalview/ws/jabaws/DisorderAnnotExportImport.java @@ -35,6 +35,7 @@ import jalview.io.StockholmFileTest; import jalview.ws.api.ServiceWithParameters; import jalview.ws.jws2.Jws2Discoverer; import jalview.ws.jws2.SeqAnnotationServiceCalcWorker; +import jalview.ws.slivkaws.SlivkaWSDiscoverer; import java.util.ArrayList; import java.util.List; @@ -81,11 +82,12 @@ public class DisorderAnnotExportImport // don't get services until discoverer has finished Thread.sleep(100); } - + SlivkaWSDiscoverer disc2 = SlivkaWSDiscoverer.getInstance(); + disc2.run(); iupreds = new ArrayList<>(); - for (ServiceWithParameters svc : disc.getServices()) + for (ServiceWithParameters svc : disc2.getServices()) { - if (svc.getNameURI().toLowerCase().contains("iupredws")) + if (svc.getNameURI().toLowerCase().contains("iupred")) { iupreds.add(svc); }