[rules-dev] windows bug for kagent
Esteban Aliverti
esteban.aliverti at gmail.com
Wed Jul 28 09:05:08 EDT 2010
Great, Thanks!
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com
On Wed, Jul 28, 2010 at 10:01 AM, Mark Proctor <mproctor at codehaus.org>wrote:
> On 28/07/2010 13:44, Esteban Aliverti wrote:
>
> Did you modify the tests?
>
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>
> yes I stuck a load of System.gc() calls before thread sleeps, that seems to
> have stablised tests on windows
>
> Mark
>
>
> Esteban Aliverti
> - Developer @ http://www.plugtree.com
> - Blog @ http://ilesteban.wordpress.com
>
>
> On Wed, Jul 28, 2010 at 12:22 AM, Mark Proctor <mproctor at codehaus.org>wrote:
>
>> I was just looking into why the kagent stuff fails on my windows,
>> found a bug in Windows:
>> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4243868
>>
>> So the cause was a single attempt to setLastModified on a file, without
>> checking if it was sucessful. So instead I recommend the following when
>> dealing with files:
>> int count = 0;
>> while ( !f.setLastModified(t) && count < 10 ) {
>> count++;
>> System.gc();
>> Thread.sleep( 100 );
>> }
>>
>> If the setLastModified still returns false then throw an exception.
>>
>> Mark
>>
>> _______________________________________________
>> rules-dev mailing list
>> rules-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-dev
>>
>
>
> _______________________________________________
> rules-dev mailing listrules-dev at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-dev
>
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20100728/dd33ed65/attachment.html
More information about the rules-dev
mailing list