X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=test%2Fjalview%2Fgui%2FAlignViewportTest.java;h=3ba93bc4f7ac37c463488fb70117f50e71f98ca8;hb=447c5c1b22bd12a78730640321264fb38c39ec7b;hp=ff8b19cc34da5ae64564ca3c29ab9e71befd224c;hpb=ad16d6cce49a40ea1943431b980b85a6212bb9bf;p=jalview.git diff --git a/test/jalview/gui/AlignViewportTest.java b/test/jalview/gui/AlignViewportTest.java index ff8b19c..3ba93bc 100644 --- a/test/jalview/gui/AlignViewportTest.java +++ b/test/jalview/gui/AlignViewportTest.java @@ -79,7 +79,7 @@ public class AlignViewportTest /* * remove any sequence mappings left lying around by other tests */ - Desktop.getInstance().getStructureSelectionManager().resetAll(); + Desktop.getStructureSelectionManager().resetAll(); } @BeforeMethod(alwaysRun = true) @@ -274,12 +274,12 @@ public class AlignViewportTest * Test for JAL-1306 - conservation thread should run even when only Quality * (and not Conservation) is enabled in Preferences */ - @Test(groups = { "Functional" }, timeOut=2000) + @Test(groups = { "Functional" }, timeOut = 2000) // BH removed timeOut=2000 public void testUpdateConservation_qualityOnly() { Cache.setPropertyNoSave("SHOW_ANNOTATIONS", Boolean.TRUE.toString()); - Cache.setPropertyNoSave("SHOW_QUALITY", + Cache.setPropertyNoSave(Preferences.SHOW_QUALITY, Boolean.TRUE.toString()); Cache.setPropertyNoSave("SHOW_CONSERVATION", Boolean.FALSE.toString()); @@ -296,16 +296,29 @@ public class AlignViewportTest AlignViewport viewport = af.getViewport(); synchronized (this) { + System.out.println("AVT consv: " + + viewport.getAlignmentConservationAnnotation()); + try + { + wait(250); // BH increased from 50 -- was getting Quality in column 1 + // is null + } catch (InterruptedException e) + { + } + System.out.println("AVT consv: " + + viewport.getAlignmentConservationAnnotation()); while (viewport.getAlignmentConservationAnnotation() != null) { try { - wait(50); + wait(250); // BH increased from 50 -- was getting Quality in column 1 + // is null } catch (InterruptedException e) { } } } + af.paintImmediately(af.getBounds()); AlignmentAnnotation[] anns = viewport.getAlignment() .getAlignmentAnnotation(); assertNotNull("No annotations found", anns); @@ -461,8 +474,21 @@ public class AlignViewportTest String fasta = ">s1\nA-C\n>s2\nA-C\n>s3\nA-D\n>s4\n--D\n"; AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(fasta, DataSourceType.PASTE); + synchronized (this) + { + try + { + wait(50); + } catch (InterruptedException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + // af.paintImmediately(af.getBounds()); AlignViewport testme = af.getViewport(); SequenceI cons = testme.getConsensusSeq(); + System.out.println("AVT " + cons.getSequenceAsString()); assertEquals("A-C", cons.getSequenceAsString()); }