db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dyre.Tjeldv...@Sun.COM
Subject Re: derbytools/dblook_test fails
Date Mon, 09 May 2005 15:26:11 GMT
"Dag H. Wanvik" <Dag.Wanvik@Sun.COM> writes:

[snip]

> so if your tests are running in a directory containing this pattern, a
> line too much is deleted from dblook_test.tmp, thereby giving a
> comparison failure like you describe.
>
> I don't know the reason for this deletion yet, so I can't say how to
> fix it, but the work-around is obvious: Run test in a directory whose
> name does not contain this pattern ;-)

[snip]

I have found a similar problem (in the test lang/closed.java, but I
think it applies to other tests as well). It turns out that the path
to the database created by a test (typically "wombat") cannot contain
':'.

public String PersistentServiceImpl::getCanonicalServiceName(String name)

looks for the first occurence of ':' in name, and assumes that what
follows is equal to the protocol:

        public String getCanonicalServiceName(String name)
    {
                String protocolLeadIn = getType() + ":";
        int colon = name.indexOf( ':');
        if( colon > 1) // Subsubprotocols must be at least 2 characters long
        {
            if( ! name.startsWith( protocolLeadIn))
                return null; // It is not our database
            name = name.substring( colon + 1);

For those who wonder why I insist on having ':' in the path, the answer
is that I don't. I did, however, use the UNIX command 'date' to get a unique
directory name for each test run. 

I have now changed the argument to date, so that I get a time stamp
without ':', and that seems to work.

-- 
dt


Mime
View raw message