Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 15/Jul/12 4:52 PM
Description:

The /console and /consoleText logs for a job using

<hudson.tasks.Shell>
  <command>set +x
echo -n Sleeping; for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do echo -n .; sleep 1; done; echo</command>
</hudson.tasks.Shell>

do not show progress until the very end, even though the log on disk gets updated every second.

Note that

@Test public void subLineProgress() throws Exception {
    ByteBuffer buf = new ByteBuffer();
    LargeText text = new LargeText(buf, false);
    buf.write("Started.\n".getBytes());
    StringWriter w = new StringWriter();
    text.writeLogTo(0, w);
    assertEquals("Started.\n", w.toString());
    buf.write("Running...".getBytes());
    w = new StringWriter();
    text.writeLogTo(0, w);
    assertEquals("Started.\nRunning...", w.toString());
    buf.write("done.\n".getBytes());
    w = new StringWriter();
    text.writeLogTo(0, w);
    assertEquals("Started.\nRunning...done.\n", w.toString());
}

fails, but according to the Javadoc this seems to be intentional. A fix would probably need a coordinated fix in Stapler, though AnnotatedLargeText may also contribute to the problem.

Environment: Linux, JDK 7
Project: Jenkins
Labels: console buffering
Priority: Major Major
Reporter: jglick
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to