JAL-4107 fix test compilation issues
authorJim Procter <j.procter@dundee.ac.uk>
Wed, 14 Dec 2022 17:09:09 +0000 (17:09 +0000)
committerJim Procter <j.procter@dundee.ac.uk>
Wed, 14 Dec 2022 17:09:09 +0000 (17:09 +0000)
.settings/org.eclipse.buildship.core.prefs
test/jalview/bin/HiDPISettingTest1.java
test/jalview/gui/FreeUpMemoryTest.java
test/jalview/gui/SeqPanelTest.java
test/jalview/io/FileFormatsTest.java
test/jalview/structures/models/AAStructureBindingModelTest.java
test/jalview/ws/jabaws/AAConAnnotAndSettingsIO.java
test/jalview/ws/jabaws/DisorderAnnotExportImport.java
test/jalview/ws/jabaws/RNAStructExportImport.java
test/jalview/ws/jws2/ParameterUtilsTest.java

index e889521..e479558 100644 (file)
@@ -1,2 +1,13 @@
+arguments=
+auto.sync=false
+build.scans.enabled=false
+connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
 connection.project.dir=
 eclipse.preferences.version=1
+gradle.user.home=
+java.home=
+jvm.arguments=
+offline.mode=false
+override.workspace.settings=false
+show.console.view=false
+show.executions.view=false
index 137d3e1..ef76fe5 100644 (file)
@@ -84,7 +84,7 @@ public class HiDPISettingTest1
   @AfterClass(alwaysRun = true)
   public void tearDown()
   {
-    Desktop.instance.closeAll_actionPerformed(null);
+    Desktop.getInstance().closeAll_actionPerformed(null);
   }
 
   @Test(groups = { "Functional" })
index 9746af1..ba81c77 100644 (file)
@@ -188,7 +188,7 @@ public class FreeUpMemoryTest
    * 
    * @param expectedMax
    */
-  protected void checkUsedMemory(int expectedMax)
+  protected void checkUsedMemory(long expectedMax)
   {
     /*
      * request garbage collection and wait for it to run (up to 3 times);
index 82b4619..92f8d4e 100644 (file)
@@ -251,14 +251,14 @@ public class SeqPanelTest
   @AfterMethod(alwaysRun = true)
   public void tearDown()
   {
-    Desktop.instance.closeAll_actionPerformed(null);
+    Desktop.getInstance().closeAll_actionPerformed(null);
   }
 
   @Test(groups = "Functional")
   public void testFindMousePosition_wrapped_annotations()
   {
-    Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS", "true");
-    Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", "true");
+    Cache.setPropertyNoSave("SHOW_ANNOTATIONS", "true");
+    Cache.setPropertyNoSave("WRAP_ALIGNMENT", "true");
     AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(
             "examples/uniref50.fa", DataSourceType.FILE);
     AlignViewportI av = alignFrame.getViewport();
@@ -432,8 +432,8 @@ public class SeqPanelTest
   @Test(groups = "Functional")
   public void testFindMousePosition_wrapped_scaleAbove()
   {
-    Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS", "true");
-    Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", "true");
+    Cache.setPropertyNoSave("SHOW_ANNOTATIONS", "true");
+    Cache.setPropertyNoSave("WRAP_ALIGNMENT", "true");
     AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(
             "examples/uniref50.fa", DataSourceType.FILE);
     AlignViewportI av = alignFrame.getViewport();
@@ -633,9 +633,9 @@ public class SeqPanelTest
   @Test(groups = "Functional")
   public void testFindMousePosition_wrapped_noAnnotations()
   {
-    Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS", "false");
-    Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", "true");
-    Cache.applicationProperties.setProperty("FONT_SIZE", "10");
+    Cache.setPropertyNoSave("SHOW_ANNOTATIONS", "false");
+    Cache.setPropertyNoSave("WRAP_ALIGNMENT", "true");
+    Cache.setPropertyNoSave("FONT_SIZE", "10");
     AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(
             "examples/uniref50.fa", DataSourceType.FILE);
     AlignViewportI av = alignFrame.getViewport();
@@ -722,7 +722,7 @@ public class SeqPanelTest
   @Test(groups = "Functional")
   public void testFindColumn_unwrapped()
   {
-    Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", "false");
+    Cache.setPropertyNoSave("WRAP_ALIGNMENT", "false");
     AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(
             "examples/uniref50.fa", DataSourceType.FILE);
     SeqPanel testee = alignFrame.alignPanel.getSeqPanel();
@@ -791,7 +791,7 @@ public class SeqPanelTest
   @Test(groups = "Functional")
   public void testFindColumn_wrapped()
   {
-    Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", "true");
+    Cache.setPropertyNoSave("WRAP_ALIGNMENT", "true");
     AlignFrame alignFrame = new FileLoader().LoadFileWaitTillLoaded(
             "examples/uniref50.fa", DataSourceType.FILE);
     AlignViewport av = alignFrame.getViewport();
@@ -908,11 +908,11 @@ public class SeqPanelTest
   @Test(groups = "Functional")
   public void testFindMousePosition_wrapped_scales_longSequence()
   {
-    Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS", "false");
-    Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", "true");
-    Cache.applicationProperties.setProperty("FONT_SIZE", "14");
-    Cache.applicationProperties.setProperty("FONT_NAME", "SansSerif");
-    Cache.applicationProperties.setProperty("FONT_STYLE", "0");
+    Cache.setPropertyNoSave("SHOW_ANNOTATIONS", "false");
+    Cache.setPropertyNoSave("WRAP_ALIGNMENT", "true");
+    Cache.setPropertyNoSave("FONT_SIZE", "14");
+    Cache.setPropertyNoSave("FONT_NAME", "SansSerif");
+    Cache.setPropertyNoSave("FONT_STYLE", "0");
     // sequence of 50 bases, doubled 10 times, = 51200 bases
     String dna = "ATGGCCATTGGGCCCAAATTTCCCAAAGGGTTTCCCTGAGGTCAGTCAGA";
     for (int i = 0; i < 10; i++)
index b589e94..525709f 100644 (file)
@@ -28,6 +28,7 @@ import static org.testng.Assert.assertSame;
 import static org.testng.Assert.assertTrue;
 
 import java.util.Iterator;
+import java.util.Locale;
 
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
@@ -75,7 +76,7 @@ public class FileFormatsTest
   @Test(groups = "Functional")
   public void testGetReadableFormats()
   {
-    String expected = "[Fasta, PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GenBank Flatfile, ENA Flatfile, GFF or Jalview features, PDB, mmCIF, Jalview]";
+    String expected = "[Fasta, PFAM, Stockholm, PIR, BLC, AMSA, HTML, RNAML, JSON, PileUp, MSF, Clustal, PHYLIP, GenBank Flatfile, ENA Flatfile, GFF or Jalview features, PDB, mmCIF, Jalview, HMMER3, BSML]";
     FileFormats formats = FileFormats.getInstance();
     assertEquals(formats.getReadableFormats().toString(), expected);
   }
index 8818bf1..f335563 100644 (file)
@@ -439,7 +439,7 @@ public class AAStructureBindingModelTest
     PDBEntry[] pdbFiles = new PDBEntry[2];
     pdbFiles[0] = new PDBEntry("PDB1", "A", Type.PDB, "seq1.pdb");
     pdbFiles[1] = new PDBEntry("PDB2", "B", Type.PDB, "seq2.pdb");
-    StructureSelectionManager ssm = new StructureSelectionManager();
+    StructureSelectionManager ssm = StructureSelectionManager.getStructureSelectionManager(null);
 
     /*
      * map residues 1-10 to residues 21-30 (atoms 105-150) in structures
index 5428acd..ac7b37c 100644 (file)
@@ -70,7 +70,6 @@ public class AAConAnnotAndSettingsIO
   public static void setUpBeforeClass() throws Exception
   {
     Cache.loadProperties("test/jalview/io/testProps.jvprops");
-    Cache.initLogger();
     disc = JalviewJabawsTestUtils.getJabawsDiscoverer();
 
     while (disc.isRunning())
index 6bcc1da..4602e93 100644 (file)
@@ -90,8 +90,12 @@ public class DisorderAnnotExportImport
     disc2.startDiscoverer();
     while (disc2.isRunning())
     {
-      if (svc.getServiceTypeURI().toLowerCase(Locale.ROOT)
-              .contains("iupredws"))
+      Thread.sleep(100);
+    }
+    iupreds = new ArrayList<>();
+    for (ServiceWithParameters svc : disc2.getServices())
+    {
+      if (svc.getNameURI().toLowerCase().contains("iupred"))
       {
         iupreds.add(svc);
       }
index 0a9cb19..1748ec5 100644 (file)
@@ -102,7 +102,7 @@ public class RNAStructExportImport
     for (ServiceWithParameters svc : disc.getServices())
     {
 
-      if (svc.getServiceTypeURI().toLowerCase(Locale.ROOT)
+      if (svc.getServiceType().toLowerCase(Locale.ROOT)
               .contains("rnaalifoldws"))
       {
         rnaalifoldws = (Jws2Instance) svc;
index 1d3c191..97d7cb3 100644 (file)
@@ -136,7 +136,7 @@ public class ParameterUtilsTest
   public boolean isForTesting(UIinfo service)
   {
     return serviceTests.size() == 0 || serviceTests
-            .contains(service.serviceType.toLowerCase(Locale.ROOT));
+            .contains(service.getServiceType().toLowerCase(Locale.ROOT));
   }
 
   @Test(groups = { "Network" })