Test suite fails on non-default configuration

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Test suite fails on non-default configuration
Дата
Msg-id 4DAC66AB020000250003C97F@gw.wicourts.gov
обсуждение исходный текст
Ответы Re: Test suite fails on non-default configuration  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-jdbc
I just built a new jar file from a checkout of CVS HEAD, and (after
fixing up the UNICODE versus UTF8 issue) the unit tests still failed
on me:

runtest:
    [junit] Testsuite: org.postgresql.test.jdbc2.Jdbc2TestSuite
    [junit] Tests run: 293, Failures: 1, Errors: 0, Time elapsed:
35.78 sec
    [junit]
    [junit] Testcase:
testTransactionIsolation(org.postgresql.test.jdbc2.ConnectionTest):
     FAILED
    [junit] expected:<2> but was:<8>
    [junit] junit.framework.AssertionFailedError: expected:<2> but
was:<8>
    [junit]     at
org.postgresql.test.jdbc2.ConnectionTest.testTransactionIsolation(
ConnectionTest.java:210)
    [junit]
    [junit]
    [junit] Test org.postgresql.test.jdbc2.Jdbc2TestSuite FAILED

The cause is that the cluster I was running against has a
non-default postgresql.conf file -- default_transaction_isolation is
set to serializable, which runs afoul of this:

    public void testTransactionIsolation() throws Exception
    {
        con = TestUtil.openDB();

        // PostgreSQL defaults to READ COMMITTED
        assertEquals(Connection.TRANSACTION_READ_COMMITTED,
                     con.getTransactionIsolation());

Should the unit tests really be failing based on configuration
options?

-Kevin

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Mike Fowler
Дата:
Сообщение: Re: [HACKERS] JDBC connections to 9.1
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Test suite fails on non-default configuration