Attached is a patch that fixes DatabaseMetaDataTest in the JDBC
authorBruce Momjian <bruce@momjian.us>
Mon, 10 Sep 2001 15:07:58 +0000 (15:07 +0000)
committerBruce Momjian <bruce@momjian.us>
Mon, 10 Sep 2001 15:07:58 +0000 (15:07 +0000)
commit3ef5bebb726704f440f14f6a72430a70f74db2dc
treee9449fb2152f5f3e93b361e138d43e937995d945
parentec0ad6740396f53fff240ce1153315f622a556e4
Attached is a patch that fixes DatabaseMetaDataTest in the JDBC
driver's test suite. With previous patches applied, this reduces
the number of failures of the test suite from 6 to 4. The patch
fixes the test case itself, rather than the driver.

Details:

1) The driver correctly provided DatabaseMetaData about the sort
order of NULLs. This was confirmed by Peter Eisentraut on
pgsql-hackers. I fixed the test to accept/require the current
behaviour, and made it dependent on the backend version. See
nullsAreSortedAtStart(), nullsAreSortedAtEnd(),
nullsAreSortedHigh() and nullsAreSortedLow().

2) DatabaseMetaData.supportsOrderByUnrelated() correctly
returned true (an ORDER BY clause can contain columns that are
not in the SELECT clause), but the test case required false.
Fixed that.

3) Replaced deprecated assert() of junit.framework.TestCase by
assertEquals(), assertTrue() and assertNotNull(). This is
because assert will be a new keyword in Java 1.4.

4) Replaced assert(message,false) by the more elegant
fail(message).

Regards,
Ren? Pijlman <rene@lab.applinet.nl>
src/interfaces/jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java