X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fbin%2FCommandsTest2.java;h=a31b77dd9d2ffb8c97407a0b6e9ae7498053a5ab;hb=1d1edb58c9ee8baec12686a512eb18d97b9bdba1;hp=34b802e9198242e634f3358b59c548420418b100;hpb=89d2d876e6f62e428c11eb0facf618ea4c57aa8d;p=jalview.git diff --git a/test/jalview/bin/CommandsTest2.java b/test/jalview/bin/CommandsTest2.java index 34b802e..a31b77d 100644 --- a/test/jalview/bin/CommandsTest2.java +++ b/test/jalview/bin/CommandsTest2.java @@ -57,14 +57,24 @@ public class CommandsTest2 @Test( groups = - { "Functional" }, - dataProvider = "structureOpeningArgsParams") + { "Functional", "testTask1" }, + 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 annotations and viewer windows + Thread.sleep(seqNum * 50 + annNum * 50 + viewerNum * 500); + } catch (InterruptedException e) + { + e.printStackTrace(); + } + AlignFrame[] afs = Desktop.getAlignFrames(); Assert.assertNotNull(afs); Assert.assertTrue(afs.length > 0); @@ -88,6 +98,7 @@ public class CommandsTest2 AlignmentAnnotation[] aas = al.getAlignmentAnnotation(); int visibleAnn = 0; + int dcount = 0; for (AlignmentAnnotation aa : aas) { if (aa.visible) @@ -99,23 +110,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++; } @@ -131,55 +131,72 @@ public class CommandsTest2 String cmdLine, int seqNum, int annNum, - int viewerNum, - String propsFile + int structureViewerNum, */ return new Object[][] { // /* */ { "--nonews --nosplash --debug " + "--append=examples/uniref50.fa " - + "--colour=gecos:flower " + + "--colour=gecos-flower " + "--structure=[seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.cif " + "--paematrix=examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json " + "--props=test/jalview/bin/commandsTest2.jvprops1 ", 15, 7, 1 }, { "--nonews --nosplash --debug " + "--append=examples/uniref50.fa " - + "--colour=gecos:flower " + + "--colour=gecos-flower " + "--structure=[seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.cif " + "--paematrix=examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json " + "--props=test/jalview/bin/commandsTest2.jvprops2 ", 15, 4, 1 }, { "--nonews --nosplash --debug " + "--append=examples/uniref50.fa " - + "--colour=gecos:flower " + + "--colour=gecos-flower " + "--structure=[seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.cif " + "--paematrix=examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json " - + "--nossannotations " + + "--noshowssannotations " + "--props=test/jalview/bin/commandsTest2.jvprops1 ", 15, 4, 1 }, { "--nonews --nosplash --debug " + "--append=examples/uniref50.fa " - + "--colour=gecos:flower " + + "--colour=gecos-flower " + "--structure=[seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.cif " + "--paematrix=examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json " - + "--noannotations " + + "--noshowannotations " + "--props=test/jalview/bin/commandsTest2.jvprops1 ", 15, 3, 1 }, { "--nonews --nosplash --debug " + "--append=examples/uniref50.fa " - + "--colour=gecos:flower " + + "--colour=gecos-flower " + "--structure=[seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.cif " + "--paematrix=examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json " - + "--noannotations " + "--nossannotations " + + "--noshowannotations " + "--noshowssannotations " + "--props=test/jalview/bin/commandsTest2.jvprops1 ", 15, 0, 1 }, { "--nonews --nosplash --debug " + "--append=examples/uniref50.fa " - + "--colour=gecos:flower " + + "--colour=gecos-flower " + "--structure=[seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.cif " + "--paematrix=examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json " - + "--noannotations " + "--nossannotations " + + "--noshowannotations " + "--noshowssannotations " + "--props=test/jalview/bin/commandsTest2.jvprops1 ", 15, 0, 1 }, - { "--argfile=test/jalview/bin/commandsTest2.argfile1 ", 16, 19, 3 }, - { "--argfile=test/jalview/bin/commandsTest2.argfile2 ", 16, 0, 2 }, + { "--nonews --nosplash --debug --nowebservicediscovery --props=test/jalview/bin/commandsTest.jvprops --argfile=test/jalview/bin/commandsTest2.argfile1 ", + 16, 19, 3 }, + { "--nonews --nosplash --debug --nowebservicediscovery --props=test/jalview/bin/commandsTest.jvprops --argfile=test/jalview/bin/commandsTest2.argfile2 ", + 16, 0, 2 }, + { "--nonews --nosplash --debug --nowebservicediscovery --props=test/jalview/bin/commandsTest.jvprops --open=./examples/test_fab41.result/sample.a2m " + + "--allstructures " + + "--structure=./examples/test_fab41.result/test_fab41_unrelaxed_rank_1_model_3.pdb " + + "--structureviewer=none " + + "--structure=./examples/test_fab41.result/test_fab41_unrelaxed_rank_2_model_4.pdb " + + "--structure=./examples/test_fab41.result/test_fab41_unrelaxed_rank_3_model_2.pdb", + 16, 10, 0 }, + { "--nonews --nosplash --debug --nowebservicediscovery --props=test/jalview/bin/commandsTest.jvprops --open=./examples/test_fab41.result/sample.a2m " + + "--allstructures " + + "--structure=./examples/test_fab41.result/test_fab41_unrelaxed_rank_1_model_3.pdb " + + "--noallstructures " + "--structureviewer=none " + + "--structure=./examples/test_fab41.result/test_fab41_unrelaxed_rank_2_model_4.pdb " + + "--structure=./examples/test_fab41.result/test_fab41_unrelaxed_rank_3_model_2.pdb", + 16, 10, 2 }, + /* + */ // }; }