You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Mike Matrigali <mi...@sbcglobal.net> on 2011/12/13 20:46:19 UTC

how can we get better testing for collation based databases?

It seems like we are seeing a number of basic collation based errors 
getting reported.  I am wondering if we can somehow leverage our 
existing tests to get at least a one off run through the collation
codepaths.

Is there some way we could at least get the junit based non-collation 
based tests to run through the collation code paths.  Best case would
be just some override on a run to use collation based database with
a territory that matches the default collation so that results would
still be right.  I don't know how hard this would be to do and not
screw up the tests that explicitly want to test different collations.

/mikem

Re: how can we get better testing for collation based databases?

Posted by Knut Anders Hatlen <kn...@oracle.com>.
Mike Matrigali <mi...@sbcglobal.net> writes:

> It seems like we are seeing a number of basic collation based errors
> getting reported.  I am wondering if we can somehow leverage our
> existing tests to get at least a one off run through the collation
> codepaths.

Might be possible to do that by changing TestConfiguration.JUNIT_CONFIG
to include collation in the default connection attributes. Something
like this should do the trick, I think:

    private static final TestConfiguration JUNIT_CONFIG;
    static {
        Properties props = new Properties();
        props.setProperty("collation", "TERRITORY_BASED");
        JUNIT_CONFIG = new TestConfiguration().addConnectionAttributes(props);
    }


-- 
Knut Anders