From 55027d8ab5b1e5f0620724cadcf7876e1669544b Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 29 Jun 2016 13:48:58 +0100 Subject: [PATCH] JAL-1270 avoid overwriting .jalview_properties with test service urls --- test/jalview/ws/gui/Jws2ParamView.java | 2 ++ test/jalview/ws/jabaws/DisorderAnnotExportImport.java | 5 +++-- test/jalview/ws/jabaws/JalviewJabawsTestUtils.java | 14 ++++++++++++++ test/jalview/ws/jabaws/JpredJabaStructExportImport.java | 5 +++-- test/jalview/ws/jabaws/RNAStructExportImport.java | 5 +++-- test/jalview/ws/jws2/ParameterUtilsTest.java | 1 + 6 files changed, 26 insertions(+), 6 deletions(-) diff --git a/test/jalview/ws/gui/Jws2ParamView.java b/test/jalview/ws/gui/Jws2ParamView.java index 1cf1e5f..d672ab6 100644 --- a/test/jalview/ws/gui/Jws2ParamView.java +++ b/test/jalview/ws/gui/Jws2ParamView.java @@ -65,6 +65,7 @@ public class Jws2ParamView @BeforeClass(alwaysRun = true) public static void setUpBeforeClass() throws Exception { + Cache.loadProperties("test/jalview/io/testProps.jvprops"); Cache.initLogger(); disc = JalviewJabawsTestUtils.getJabawsDiscoverer(); } @@ -139,6 +140,7 @@ public class Jws2ParamView */ jf.addWindowListener(new WindowAdapter() { + @Override public void windowClosing(WindowEvent e) { thr.interrupt(); diff --git a/test/jalview/ws/jabaws/DisorderAnnotExportImport.java b/test/jalview/ws/jabaws/DisorderAnnotExportImport.java index 557ef7e..9f62481 100644 --- a/test/jalview/ws/jabaws/DisorderAnnotExportImport.java +++ b/test/jalview/ws/jabaws/DisorderAnnotExportImport.java @@ -23,6 +23,7 @@ package jalview.ws.jabaws; import static org.testng.AssertJUnit.assertNotNull; import static org.testng.AssertJUnit.assertTrue; +import jalview.bin.Cache; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.io.AnnotationFile; @@ -56,8 +57,8 @@ public class DisorderAnnotExportImport @BeforeClass(inheritGroups = true) public static void setUpBeforeClass() throws Exception { - - jalview.bin.Cache.initLogger(); + Cache.loadProperties("test/jalview/io/testProps.jvprops"); + Cache.initLogger(); disc = JalviewJabawsTestUtils.getJabawsDiscoverer(); iupreds = new ArrayList(); for (Jws2Instance svc : disc.getServices()) diff --git a/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java b/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java index 4550fe8..4414782 100644 --- a/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java +++ b/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java @@ -60,6 +60,20 @@ public class JalviewJabawsTestUtils return getJabawsDiscoverer(true); } + /** + * Returns a service discoverer that queries localhost and compbio urls. + *

+ * If using this method, be sure to have read-only Jalview properties, to + * avoid writing the test urls to .jalview_properties. This can be done by + * either + *