DaanHoogland commented on code in PR #8670:
URL: https://github.com/apache/cloudstack/pull/8670#discussion_r1500318740


##########
utils/src/test/java/com/cloud/utils/ScriptTest.java:
##########
@@ -111,6 +111,20 @@ public String interpret(BufferedReader reader) throws 
IOException {
         Assert.assertNotNull(value);
     }
 
+    @Test
+    public void executeWithOutputInterpreterAllLinesParserLargeOutput() {
+        Assume.assumeTrue(SystemUtils.IS_OS_LINUX);
+        OutputInterpreter.AllLinesParser parser = new 
OutputInterpreter.AllLinesParser();
+        Script script = new Script("seq");
+        script.add("-f");
+        script.add("my text to test cloudstack %g");
+        script.add("4096"); // AllLinesParser doesn't work with that amount of 
data
+        String value = script.execute(parser);
+        // it is a stack trace in this case as string
+        Assert.assertNull(value);
+        Assert.assertEquals(129965, parser.getLines().length());

Review Comment:
   ah, missed the meaning of the command :+1: 
   (must say beauty is not this test's purpose ;)
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to