From: Jim Procter Date: Fri, 29 Jul 2016 16:37:32 +0000 (+0100) Subject: JAL-1772 JAL-2164 make expanded view save/restore test pass when run in isolation... X-Git-Tag: Release_2_10_0~127^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ef0288b7a00ee17ffa92e80bbd808508d567e7e2;hp=8ec5b599aec222f197779a4c19e09afd0b5ab13e;p=jalview.git JAL-1772 JAL-2164 make expanded view save/restore test pass when run in isolation (problem may be that load returns an alignFrame that isn’t actually the one shown in the desktop…) --- diff --git a/test/jalview/io/Jalview2xmlTests.java b/test/jalview/io/Jalview2xmlTests.java index 38153df..26fba58 100644 --- a/test/jalview/io/Jalview2xmlTests.java +++ b/test/jalview/io/Jalview2xmlTests.java @@ -364,9 +364,7 @@ public class Jalview2xmlTests } /** - * test store and recovery of expanded views - currently this is disabled - * since the Desktop.explodeViews method doesn't seem to result in the views - * being expanded to distinct align frames when executed programmatically. + * test store and recovery of expanded views * * @throws Exception */ @@ -377,24 +375,9 @@ public class Jalview2xmlTests "examples/exampleFile_2_7.jar", FormatAdapter.FILE); assertTrue("Didn't read in the example file correctly.", af != null); String afid = af.getViewport().getSequenceSetId(); - { - final AlignFrame xaf = af; - af = null; - new Thread(new Runnable() - { - @Override - public void run() - { - Desktop.instance.explodeViews(xaf); - } - }).start(); - Thread.sleep(1000); - } - // int times = 0; - // while (++times < 5 && Desktop.getAlignFrames().length < ) - // { - // Thread.sleep(300); - // } + + Desktop.explodeViews(Desktop.getAlignFrameFor(af.getViewport())); + int oldviews = Desktop.getAlignFrames().length; Assert.assertEquals(Desktop.getAlignFrames().length, Desktop.getAlignmentPanels(afid).length);