Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-14435

No incremental display of progress within a line

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • core
    • Linux, JDK 7

      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.

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: