0 Replies Latest reply on Sep 26, 2009 9:46 AM by legrosb

    FlexUnit4AntTasks project updated

    legrosb Level 3

      Afternoon everyone,

       

      I've deployed some changes to the FlexUnit4AntTasks project as detailed below:

       

      - Added validation to the task's attributes

      - Now uses absolute paths to SWF file and can resolved paths on the Mac with spaces.

      - Refactored logging to be more verbose for easier debugging

      - Setup the FlashPlayer to be spawned using Ant's Excecute class for simpler OS integration

      - Added the "buffer" attribute to the task so that large tests suites won't clobber data waiting in its inbound buffer

       

      I believe that the last item in this list may help those experiences issues with partial test results being written to disk.  To explain, currently the implementation of the Ant task spawns a thread to launch a socket server to communicate with the Flash Player.  The socket server's inbound data stream, by default, had a fixed size of about 8K.  By its original design back in the FU1 days, the same thread that spawned the socket server is responsible for writing the results to disk.  My theory is that as data is being buffered from the socket, the thread is occupied with writing to disk as well as reading the data from the buffer.  If the data coming into the buffer begins to overflow, I believe that will clobber data existing in the buffer that has yet to be written to disk.  I've changed the default buffer size to now be ~256K which is pretty large, but we are sending stack traces across the wire, so it may be needed for large test suites; I'm open to reducing this number based on feedback.  You can change the value of the inbound data buffer by setting the "buffer" attribute to the Ant task (remember the size is in bytes).

       

      If possible, please let me know what issues y'all are running into with this new build.  As a side note, make sure you use the Ant build script to produce the JAR.  I did some basic testing on VMs running Windows XP and Ubuntu with the sample project, so hopefully the gremlins will be sneakier and harder to find this time around.

       

      -Brian