Huh.  I wonder how ant is doing it?

Using the ant task directly makes it impossible to do this from within JUnit, 
of course, but maybe the same hack can be done inside the test stuff.

Karl

-----Original Message-----
From: ext Koji Sekiguchi [mailto:k...@r.email.ne.jp] 
Sent: Tuesday, June 08, 2010 10:08 AM
To: connectors-dev@incubator.apache.org
Subject: Re: Derby/JUnit bad interaction - any ideas?

(10/06/08 22:35), karl.wri...@nokia.com wrote:
> I've been trying to get some basic tests working under Junit.  Unfortunately, 
> I've run into a Derby problem which prevents these tests from working.
>
> What happens is this.  Derby, when it creates a database, forces a number of 
> directories within the database to "read-only".  Unfortunately, unless we 
> stipulate Java 1.6 or up, there is no native Java way to make these 
> directories become non-read-only.  So database cleanup always fails to 
> actually remove the old database, and then new database creation subsequently 
> fails.
>
> So there are two possibilities.  First, we can change things so we never 
> actually try to clean up the Derby DB.  Second, we can mandate the java 1.6 
> is used for LCF.  That's all there really is.
>
> The first possibility is tricky but doable - I think.  The second would 
> probably be unacceptable in many ways.
>
> Thoughts?
>
> Karl
>    
Hi Karl,

If it is possible, Ant chmod task can be used, or
you can consult the implementation. But Ant manual
says for the task:

" Right now it has effect only under Unix or NonStop Kernel (Tandem)."
http://ant.apache.org/manual/Tasks/chmod.html

Koji

-- 
http://www.rondhuit.com/en/

Reply via email to