From: Jim Procter Date: Tue, 10 Jun 2014 16:21:31 +0000 (+0100) Subject: JAL-1379 allow JABA2 tests to run on local or default service X-Git-Tag: Jalview_2_9~182^2~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e33911e748178b34692186679eda1c49aa17e56f;p=jalview.git JAL-1379 allow JABA2 tests to run on local or default service --- diff --git a/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java b/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java index ba78107..295c3bf 100644 --- a/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java +++ b/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java @@ -56,19 +56,25 @@ public class JalviewJabawsTestUtils public static jalview.ws.jws2.Jws2Discoverer getJabawsDiscoverer() { + return getJabawsDiscoverer(true); + } + public static Jws2Discoverer getJabawsDiscoverer(boolean localhost) + { jalview.ws.jws2.Jws2Discoverer disc = jalview.ws.jws2.Jws2Discoverer .getDiscoverer(); - int p = 0; String svcurls = ""; - Vector services = new Vector(); - for (String url : JalviewJabawsTestUtils.serviceUrls) + if (localhost) { - svcurls += url + "; "; - services.add(url); + int p = 0; + Vector services = new Vector(); + for (String url : JalviewJabawsTestUtils.serviceUrls) + { + svcurls += url + "; "; + services.add(url); + } + ; + Jws2Discoverer.setServiceUrls(services); } - ; - Jws2Discoverer.setServiceUrls(services); - try { disc.run(); @@ -82,4 +88,5 @@ public class JalviewJabawsTestUtils return disc; } + } diff --git a/test/jalview/ws/jabaws/RNAStructExportImport.java b/test/jalview/ws/jabaws/RNAStructExportImport.java index 61e0782..9a723ca 100644 --- a/test/jalview/ws/jabaws/RNAStructExportImport.java +++ b/test/jalview/ws/jabaws/RNAStructExportImport.java @@ -70,7 +70,7 @@ public class RNAStructExportImport { jalview.bin.Cache.initLogger(); - disc = JalviewJabawsTestUtils.getJabawsDiscoverer(); + disc = JalviewJabawsTestUtils.getJabawsDiscoverer(false); for (Jws2Instance svc : disc.getServices()) {