From cd8f610d2fb253a222192517c18b84ce02959c48 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Mon, 24 Apr 2023 10:54:56 +0100 Subject: [PATCH] JAL-629 Move diagnostics to the right place --- test/jalview/bin/CommandsTest2.java | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) 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++; } -- 1.7.10.2