X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fbin%2FCommandLineOperations.java;h=70a70de4c82bf3c6d440679066280d194ffd5b53;hb=c19d2a91ca05e052e3408bf5852d88eb5d0608f1;hp=adc24dbc6cef060af67acbaaffe2894860c90958;hpb=28fda83cbef0c9c82cd09a343af4e1721085c104;p=jalview.git diff --git a/test/jalview/bin/CommandLineOperations.java b/test/jalview/bin/CommandLineOperations.java index adc24db..70a70de 100644 --- a/test/jalview/bin/CommandLineOperations.java +++ b/test/jalview/bin/CommandLineOperations.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) $$Year-Rel$$ The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2) + * Copyright (C) 2015 The Jalview Authors * * This file is part of Jalview. * @@ -48,8 +48,11 @@ public class CommandLineOperations private static class Worker extends Thread { private final Process process; + private BufferedReader outputReader; + private BufferedReader errorReader; + private Integer exit; private Worker(Process process) @@ -132,7 +135,6 @@ public class CommandLineOperations new CommandLineOperations(); } - @BeforeTest(alwaysRun = true) public void setUpForHeadlessCommandLineInputOperations() throws IOException @@ -173,16 +175,16 @@ public class CommandLineOperations } } - @Test(groups = - { "Functional" }, dataProvider = "allInputOpearationsData") + @Test(groups = { "Functional" }, dataProvider = "allInputOpearationsData") public void testAllInputOperations(String expectedString, String failureMsg) { Assert.assertTrue(successfulCMDs.contains(expectedString), failureMsg); } - @Test(groups = - { "Functional" }, dataProvider = "headlessModeOutputOperationsData") + @Test( + groups = { "Functional" }, + dataProvider = "headlessModeOutputOperationsData") public void testHeadlessModeOutputOperations(String harg, String type, String fileName, boolean withAWT, int expectedMinFileSize, int timeout) @@ -208,12 +210,10 @@ public class CommandLineOperations new File(fileName).delete(); } - @DataProvider(name = "allInputOpearationsData") public Object[][] getHeadlessModeInputParams() { - return new Object[][] - { + return new Object[][] { // headless mode input operations { "CMD [-color zappo] executed successfully!", "Failed command : -color zappo" }, @@ -243,16 +243,14 @@ public class CommandLineOperations { "CMD [-nousagestats] executed successfully!", "Failed command : -nousagestats" }, { "CMD [-noquestionnaire] executed successfully!", - "Failed command : -noquestionnaire nickname=www.test.com" } - }; + "Failed command : -noquestionnaire nickname=www.test.com" } }; } - + @DataProvider(name = "headlessModeOutputOperationsData") public static Object[][] getHeadlessModeOutputParams() { - return new Object[][] - { + return new Object[][] { { "nodisplay -open examples/uniref50.fa", " -eps", "test_uniref50_out.eps", true, 4096, 4000 }, { "nodisplay -open examples/uniref50.fa", " -eps", @@ -284,7 +282,6 @@ public class CommandLineOperations { "headless -open examples/uniref50.fa", " -blc", "test_uniref50_out.blc", true, 2096, 3000 }, { "headless -open examples/uniref50.fa", " -jalview", - "test_uniref50_out.jvp", true, 2096, 3000 }, - }; + "test_uniref50_out.jvp", true, 2096, 3000 }, }; } }