Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id D43F91337C0A for ; Mon, 18 Apr 2011 22:30:41 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 67289-01-5 for ; Tue, 19 Apr 2011 01:30:36 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mail.postgresql.org (Postfix) with ESMTP id 01DFA1337C44 for ; Mon, 18 Apr 2011 22:29:50 -0300 (ADT) Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id 9EA962840A; Mon, 18 Apr 2011 21:29:51 -0400 (EDT) Received: by leary.csoft.net (Postfix, from userid 1112) id 6007CA3E4; Mon, 18 Apr 2011 21:29:51 -0400 (EDT) Date: Mon, 18 Apr 2011 21:29:50 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Tom Lane cc: Kevin Grittner , pgsql-jdbc@postgresql.org Subject: Re: Test suite fails on non-default configuration In-Reply-To: <18342.1303168369@sss.pgh.pa.us> Message-ID: References: <4DAC66AB020000250003C97F@gw.wicourts.gov> <18342.1303168369@sss.pgh.pa.us> User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/73 X-Sequence-Number: 21799 On Mon, 18 Apr 2011, Tom Lane wrote: > "Kevin Grittner" writes: >> // PostgreSQL defaults to READ COMMITTED >> assertEquals(Connection.TRANSACTION_READ_COMMITTED, >> con.getTransactionIsolation()); > >> Should the unit tests really be failing based on configuration >> options? > > Well, for a comparison point, you can certainly make the server's > regression tests fail too if you whack the configuration around enough. > I agree that the above seems perhaps overly fragile, but I don't think > you can expect to have a general principle that the JDBC tests should > pass regardless of configuration. It's more a question of how painful > is it to support any particular nondefault configuration choice, and > does it seem worth it based on real-world usage of the choice. > Exactly. In this case the tests were assuming too much for no real purpose. I've checked in a fix to work with any default isolation level. Kris Jurka