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

CVS changelog breaks for >1K of update text

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      See attached log. Note that the CVS command is truncated in 'ImportUITest.jav'.
      If you open just the CVS output from the 'subversion' module in a text editor,
      you will notice that that occurs exactly at position 1024.

      So I presume CVSSCM.update is forking the process and getting the first 1K of
      data from the CVS update process, but after 1K something is buffered and the
      remainder is never gathered or sent to parseUpdateOutput. WriterOutputStream bug
      perhaps? (It uses 1K buffers...) Really I'm not sure why WOS is used here; would
      be simpler to write to a ByteArrayOutputStream, then use an InputStreamReader in
      parseUpdateOutput.

      In fact if you write the following test class:

      import java.io.OutputStream;
      import java.io.OutputStreamWriter;
      import java.io.PrintStream;
      public class Demo {
      public static void main(String[] args) throws Exception {
      OutputStream os = new WriterOutputStream(new
      OutputStreamWriter(System.out));
      PrintStream ps = new PrintStream(os);
      for (int i = 0; i < 100; i++)

      { ps.println("#" + i + " blah blah blah"); }

      os.close();
      }
      }

      you will see

      #0 blah blah blah
      #1 blah blah blah
      #2 blah blah blah
      ....
      #52 blah blah blah
      #53 blah blah blah
      #54 blah

      which looks like the same bug: just 1K of output is produced. Calling os.flush()
      before os.close() fixes that problem, so I will try patching Hudson accordingly.

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: