<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 28/07/2010 13:44, Esteban Aliverti wrote:
    <blockquote
      cite="mid:AANLkTim+NBG0HSBg7BzPRwKZ7_ZgeMC90u+upphMpyC-@mail.gmail.com"
      type="cite">Did you modify the tests?<br clear="all">
      <br>
      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>
    </blockquote>
    yes I stuck a load of System.gc() calls before thread sleeps, that
    seems to have stablised tests on windows<br>
    <br>
    Mark<br>
    <blockquote
      cite="mid:AANLkTim+NBG0HSBg7BzPRwKZ7_ZgeMC90u+upphMpyC-@mail.gmail.com"
      type="cite"><br>
      Esteban Aliverti<br>
      - Developer @ <a moz-do-not-send="true"
        href="http://www.plugtree.com" target="_blank">http://www.plugtree.com
      </a><br>
      - Blog @ <a moz-do-not-send="true"
        href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
      <br>
      <br>
      <div class="gmail_quote">On Wed, Jul 28, 2010 at 12:22 AM, Mark
        Proctor <span dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;"> &nbsp;I was just looking into why the kagent
          stuff fails on my windows,<br>
          found a bug in Windows:<br>
          <a moz-do-not-send="true"
            href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4243868"
            target="_blank">http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4243868</a><br>
          <br>
          So the cause was a single attempt to setLastModified on a
          file, without<br>
          checking if it was sucessful. So instead I recommend the
          following when<br>
          dealing with files:<br>
          &nbsp; &nbsp; &nbsp; &nbsp; int count = 0;<br>
          &nbsp; &nbsp; &nbsp; &nbsp; while ( !f.setLastModified(t) &amp;&amp; count &lt; 10
          ) {<br>
          &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count++;<br>
          &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.gc();<br>
          &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Thread.sleep( 100 );<br>
          &nbsp; &nbsp; &nbsp; &nbsp; }<br>
          <br>
          If the setLastModified still returns false then throw an
          exception.<br>
          <br>
          Mark<br>
          <br>
          _______________________________________________<br>
          rules-dev mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
          <a moz-do-not-send="true"
            href="https://lists.jboss.org/mailman/listinfo/rules-dev"
            target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
        </blockquote>
      </div>
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>