pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: pgsql-jdbc@postgresql.org
Subject: Test suite fails on non-default configuration
Date: Mon, 18 Apr 2011 16:28:27 -0500
Message-ID: <4DAC66AB020000250003C97F@gw.wicourts.gov> (raw)

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



view thread (4+ messages)  latest in thread

Message-ID: <4DAC66AB020000250003C97F@gw.wicourts.gov>
Permalink:  ../4DAC66AB020000250003C97F@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4DAC66AB020000250003C97F@gw.wicourts.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov
  Subject: Re: Test suite fails on non-default configuration
  In-Reply-To: <4DAC66AB020000250003C97F@gw.wicourts.gov>
  References: <4DAC66AB020000250003C97F@gw.wicourts.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox