From: Ben Soares Date: Mon, 24 Apr 2023 09:54:56 +0000 (+0100) Subject: JAL-629 Move diagnostics to the right place X-Git-Tag: Release_2_11_3_0~14^2~103 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=cd8f610d2fb253a222192517c18b84ce02959c48 JAL-629 Move diagnostics to the right place --- diff --git a/test/jalview/bin/CommandsTest2.java b/test/jalview/bin/CommandsTest2.java index 34b802e..27759b9 100644 --- a/test/jalview/bin/CommandsTest2.java +++ b/test/jalview/bin/CommandsTest2.java @@ -58,13 +58,23 @@ public class CommandsTest2 @Test( groups = { "Functional" }, - dataProvider = "structureOpeningArgsParams") + dataProvider = "structureOpeningArgsParams", + singleThreaded = true) public void structureOpeningArgsTest(String cmdLine, int seqNum, int annNum, int viewerNum) { String[] args = cmdLine.split("\\s+"); Jalview.main(args); + try + { + // sleep for slow build server to open viewer window + Thread.sleep(2500); + } catch (InterruptedException e) + { + e.printStackTrace(); + } + AlignFrame[] afs = Desktop.getAlignFrames(); Assert.assertNotNull(afs); Assert.assertTrue(afs.length > 0); @@ -88,8 +98,11 @@ public class CommandsTest2 AlignmentAnnotation[] aas = al.getAlignmentAnnotation(); int visibleAnn = 0; + int dcount = 0; for (AlignmentAnnotation aa : aas) { + System.err.println("##### DIAGNOSIS: annotation " + dcount + + " is labelled '" + aa.label + "'"); if (aa.visible) visibleAnn++; } @@ -99,23 +112,12 @@ public class CommandsTest2 if (viewerNum > -1) { - try - { - // sleep for slow build server to open viewer window - Thread.sleep(2000); - } catch (InterruptedException e) - { - e.printStackTrace(); - } List openViewers = Desktop.instance .getStructureViewers(ap, null); Assert.assertNotNull(openViewers); int count = 0; - int dcount = 0; for (StructureViewerBase svb : openViewers) { - System.err.println("##### DIAGNOSIS: annotation " + dcount - + " is called '" + svb.getName() + "'"); if (svb.isVisible()) count++; }