From 942cc6dcee175123aefd418a040d7fc6c7e8f6c5 Mon Sep 17 00:00:00 2001 From: hansonr Date: Tue, 8 Oct 2019 15:25:29 +0200 Subject: [PATCH] JAL-3453 test to see if the build testing passes this test. Slight modifications from Mungo's last commit to account for recent changes in public/private fields, but that is all. Passing tests on Bob's Windows machine. --- src/jalview/bin/Cache.java | 4 ++-- test/jalview/gui/AlignFrameTest.java | 24 +----------------------- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index b15c317..7128ca4 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -224,7 +224,7 @@ public class Cache implements ApplicationSingletonI * * @return */ - private static Cache getInstance() + public static Cache getInstance() { return (Cache) ApplicationSingletonProvider.getInstance(Cache.class); } @@ -287,7 +287,7 @@ public class Cache implements ApplicationSingletonI /** Jalview Properties */ // BH 2019.05.08 was static @SuppressWarnings("serial") - private Properties applicationProperties = new Properties() + public Properties applicationProperties = new Properties() { // override results in properties output in alphabetical order @Override diff --git a/test/jalview/gui/AlignFrameTest.java b/test/jalview/gui/AlignFrameTest.java index 68f0282..b972c48 100644 --- a/test/jalview/gui/AlignFrameTest.java +++ b/test/jalview/gui/AlignFrameTest.java @@ -158,7 +158,6 @@ public class AlignFrameTest * use read-only test properties file */ Cache.loadProperties("test/jalview/io/testProps.jvprops"); - Cache.setPropertyNoSave("SHOW_JWS2_SERVICES", Boolean.FALSE.toString()); Jalview.main(new String[] { "-nonews" }); } @@ -176,7 +175,7 @@ public class AlignFrameTest public void setUp() { Cache.loadProperties("test/jalview/io/testProps.jvprops"); - Cache.setPropertyNoSave("SHOW_IDENTITY", + Cache.getInstance().applicationProperties.setProperty("SHOW_IDENTITY", Boolean.TRUE.toString()); af = new FileLoader().LoadFileWaitTillLoaded("examples/uniref50.fa", DataSourceType.FILE); @@ -342,7 +341,6 @@ public class AlignFrameTest @Test(groups = "Functional") public void testColourThresholdActions() { - AlignViewport av = af.getViewport(); AlignmentI al = av.getAlignment(); @@ -376,12 +374,7 @@ public class AlignFrameTest SliderPanel sp = SliderPanel.getSliderPanel(); assertTrue(sp.isForConservation()); assertEquals(sp.getValue(), 30); // initial slider setting - - // BH 2019.08.28 this was necessary so that rs was updated - af.changeColour_actionPerformed(JalviewColourScheme.Helix.toString()); - sp.valueChanged(10); - assertSame(rs, av.getResidueShading()); c = rs.findColour('I', 14, ferCapan); Color i_faded = new Color(196, 186, 196); @@ -506,21 +499,6 @@ public class AlignFrameTest assertEquals(c, s_original); } - private void waitSome() - { - - // just a hack - synchronized (this) - { - try - { - wait(250); - } catch (InterruptedException e) - { - } - } - } - /** * Verify that making a New View transfers alignment and group colour schemes, * including any thresholds, to the new view. Because New View is performed by -- 1.7.10.2