You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Mike Müller <mi...@mysign.ch> on 2009/08/06 13:15:42 UTC
RE: Sling fails to build
Hi
Has anybody the same issue on Win XP with the SlingLogWriterTest?
> >> snip snap
> > > Failed tests:
> > >
> > test_daily_rotation(org.apache.sling.commons.log.internal.slf4
> > j.SlingLogWriterTest)
> > >
> > > Tests run: 17, Failures: 1, Errors: 0, Skipped: 0
> > >
> > this works for me (and it seems to work for our Hudson instance as
> > well). Can you give us more information about your environment?
>
> It's WinXP SP3. I digged into it and found that
> test.setLastModified(july21)
> (line 190 of SlingLogWriterTest) doesn't change the modified
> date of the file.
> So the test fails at line 195. But I can't imagine why it
> doesn't change
> the date of the file.
best regards
mike
Re: Sling fails to build
Posted by Bertrand Delacretaz <bd...@apache.org>.
On Thu, Aug 6, 2009 at 3:03 PM, Bertrand
Delacretaz<bd...@apache.org> wrote:
> If you haven't bought a mac yet, can you test the patch attached to
> https://issues.apache.org/jira/browse/SLING-1074 ?...
Mike reports that patch works, applied.
-Bertrand
Re: Sling fails to build
Posted by Bertrand Delacretaz <bd...@apache.org>.
On Thu, Aug 6, 2009 at 2:46 PM, Mike Müller<mi...@mysign.ch> wrote:
> ...Is it possible to force the logger to close the file? Any other ideas?...
If you haven't bought a mac yet, can you test the patch attached to
https://issues.apache.org/jira/browse/SLING-1074 ?
-Bertrand
Re: Sling fails to build
Posted by Paul Noden <no...@nodster.co.uk>.
Hi Mike,
You could try wholockme, which I have used in the past. Alternatively there
is another app called unlocker which allows the unlocking of the file - but
haven't tested this one.
2009/8/6 Bertrand Delacretaz <bd...@apache.org>
> To check that, you could stop the code with a debugger at that point,
> and check with some Windows tool (don't know which one unfortunately,
> unixish systems would use lsof) if the file is open.
>
>
--
Kind Regards,
Paul Noden
Re: Sling fails to build
Posted by Julian Reschke <ju...@gmx.de>.
Bertrand Delacretaz wrote:
> Hi Mike,
>
> On Thu, Aug 6, 2009 at 1:15 PM, Mike Müller<mi...@mysign.ch> wrote:
>> Has anybody the same issue on Win XP with the SlingLogWriterTest?...
>
> I haven't tested but
>
>>> ... It's WinXP SP3. I digged into it and found that
>>> test.setLastModified(july21)
>>> (line 190 of SlingLogWriterTest) doesn't change the modified
>>> date of the file.
>>> So the test fails at line 195. But I can't imagine why it
>>> doesn't change
>>> the date of the file....
>
> Maybe because the file is still open? That's a common cause of such
> problems under Windows.
>
> To check that, you could stop the code with a debugger at that point,
> and check with some Windows tool (don't know which one unfortunately,
> unixish systems would use lsof) if the file is open.
"handle" is your friend... See
<http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx>.
BR, Juliam
RE: Sling fails to build
Posted by Mike Müller <mi...@mysign.ch>.
> > Has anybody the same issue on Win XP with the SlingLogWriterTest?...
>
> I haven't tested but
>
> >>... It's WinXP SP3. I digged into it and found that
> >> test.setLastModified(july21)
> >> (line 190 of SlingLogWriterTest) doesn't change the modified
> >> date of the file.
> >> So the test fails at line 195. But I can't imagine why it
> >> doesn't change
> >> the date of the file....
>
> Maybe because the file is still open? That's a common cause of such
> problems under Windows.
That's definitively the case here, I checked that. I guess it's the
Logger itself which holds a handle to the file. The question is now
if anybody sees a chance to change the test in a way that it tests
what it should test and don't fails under Win XP (yes I know I should
buy a mac ;-)).
Is it possible to force the logger to close the file? Any other ideas?
best regards
mike
Re: Sling fails to build
Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi Mike,
On Thu, Aug 6, 2009 at 1:15 PM, Mike Müller<mi...@mysign.ch> wrote:
> Has anybody the same issue on Win XP with the SlingLogWriterTest?...
I haven't tested but
>>... It's WinXP SP3. I digged into it and found that
>> test.setLastModified(july21)
>> (line 190 of SlingLogWriterTest) doesn't change the modified
>> date of the file.
>> So the test fails at line 195. But I can't imagine why it
>> doesn't change
>> the date of the file....
Maybe because the file is still open? That's a common cause of such
problems under Windows.
To check that, you could stop the code with a debugger at that point,
and check with some Windows tool (don't know which one unfortunately,
unixish systems would use lsof) if the file is open.
-Bertrand