X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 93C7F3A43AA for ; Thu, 18 Nov 2004 18:58:07 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 97090-07 for ; Thu, 18 Nov 2004 18:58:02 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 2E76C3A40B2 for ; Thu, 18 Nov 2004 18:58:02 +0000 (GMT) Received: (qmail 5988 invoked from network); 18 Nov 2004 18:57:55 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 18 Nov 2004 18:57:55 -0000 Message-ID: <419CF0B8.1000206@fastcrypt.com> Date: Thu, 18 Nov 2004 13:58:00 -0500 From: Dave Cramer Reply-To: pg@fastcrypt.com Organization: Postgres International User-Agent: Mozilla Thunderbird 0.9 (X11/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Vadim Nasardinov Cc: pgsql-jdbc@postgresql.org Subject: Re: 1+1+16 = 18 failures References: <200410221627.20176@vadim.nasardinov> <200411171506.13490@vadim.nasardinov> <419BB3BE.8090706@opencloud.com> <200411181320.32829@vadim.nasardinov> In-Reply-To: <200411181320.32829@vadim.nasardinov> Content-Type: multipart/alternative; boundary="------------040307010808090303020303" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.5 tagged_above=0.0 required=5.0 tests=HTML_MESSAGE, HTML_TITLE_EMPTY X-Spam-Level: X-Archive-Number: 200411/137 X-Sequence-Number: 11559 This is a multi-part message in MIME format. --------------040307010808090303020303 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I've sort of eluded to this before. testSupportsStoredProcedures is allowed to return false. The test suite is quite arbitrary, I'd sooner see your (and others) efforts going towards beefing up our internal test suite. Dave Vadim Nasardinov wrote: >On Wednesday 17 November 2004 15:25, Oliver Jowett wrote: > > >>Did you get any useful test results from the non-EJB modes? Anything >>the driver does wrong there? >> >> > >No, I didn't see any cases where the blame could be pegged squarely on >the driver, except the testSupportsStoredProcedures test. > >If I run the test with this exclusion list: >http://java.sun.com/products/jdbc/exclude.1.2.1.txt?button=Download > >I get 18 failures out of 548 tests. One of them is > > testSupportsStoredProcedures > >This fails because in >org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java, we have > > public boolean supportsStoredProcedures() throws SQLException > { > return false; > } > >whereas the test harness expects this method to return true. > >One other failure looks like a bug in the harness. Specifically, > testGetSQLState >fails because this condition > b.getSQLState() instanceof java.lang.String > >tests false, where b is a SQLException. Now, the only way this can >possibly happen is if getSQLState() returns null. Looking at the >javadoc >http://java.sun.com/j2se/1.4.2/docs/api/java/sql/SQLException.html#getSQLState%28%29 > >I don't see anything that says the method is not allowed to return >null. Looks like a bug in the CTS. > > >The remaining 16 failures are all due to the same reason. The backend >chokes on the following query (or some variation thereof): > > | DB1=> select substring(version(), 1, 20) as version; > | version > | ---------------------- > | PostgreSQL 7.3.4-RH > | (1 row) > | DB1=> create table Real_Tab (MAX_VAL REAL, MIN_VAL REAL,NULL_VAL REAL); > | CREATE TABLE > | DB1=> insert into Real_Tab values(3.4E38,1.4E-45, null); > | ERROR: Bad float4 input format -- underflow > > >The funny part is that I can do > > | DB1=> select 1.4E-45; > | ?column? > | -------------------------------------------------- > | 0.0000000000000000000000000000000000000000000014 > | (1 row) > | DB1=> select 3.4E38; > | ?column? > | ----------------------------------------- > | 340000000000000000000000000000000000000 > | (1 row) > >But I would have to test this against a more recent version of the >backend. In any case, these 16 failures don't be seem to be caused >by the driver. > > > >Vadim > > >---------------------------(end of broadcast)--------------------------- >TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > > > > -- Dave Cramer http://www.postgresintl.com 519 939 0336 ICQ#14675561 --------------040307010808090303020303 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I've sort of eluded to this before. testSupportsStoredProcedures is allowed to return false.
The test suite is quite arbitrary, I'd sooner see your (and others) efforts going towards beefing up our internal test suite.

Dave

Vadim Nasardinov wrote:
On Wednesday 17 November 2004 15:25, Oliver Jowett wrote:
  
Did you get any useful test results from the non-EJB modes? Anything
the driver does wrong there?
    

No, I didn't see any cases where the blame could be pegged squarely on
the driver, except the testSupportsStoredProcedures test.

If I run the test with this exclusion list:
http://java.sun.com/products/jdbc/exclude.1.2.1.txt?button=Download

I get 18 failures out of 548 tests.  One of them is

  testSupportsStoredProcedures

This fails because in
org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java, we have

     public boolean supportsStoredProcedures() throws SQLException
     {
         return false;
     }

whereas the test harness expects this method to return true.

One other failure looks like a bug in the harness.  Specifically,
   testGetSQLState
fails because this condition
  b.getSQLState() instanceof java.lang.String

tests false, where b is a SQLException.  Now, the only way this can
possibly happen is if getSQLState() returns null.  Looking at the
javadoc
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/SQLException.html#getSQLState%28%29

I don't see anything that says the method is not allowed to return
null.  Looks like a bug in the CTS.


The remaining 16 failures are all due to the same reason.  The backend
chokes on the following query (or some variation thereof):

  | DB1=> select substring(version(), 1, 20) as version;
  |        version        
  | ----------------------
  |  PostgreSQL 7.3.4-RH 
  | (1 row)
  | DB1=> create table Real_Tab (MAX_VAL REAL, MIN_VAL REAL,NULL_VAL REAL);
  | CREATE TABLE
  | DB1=> insert into Real_Tab values(3.4E38,1.4E-45, null);
  | ERROR:  Bad float4 input format -- underflow


The funny part is that I can do

  | DB1=> select 1.4E-45;
  |                      ?column?                     
  | --------------------------------------------------
  |  0.0000000000000000000000000000000000000000000014
  | (1 row)
  | DB1=> select 3.4E38;
  |                 ?column?                 
  | -----------------------------------------
  |  340000000000000000000000000000000000000
  | (1 row)

But I would have to test this against a more recent version of the
backend.  In any case, these 16 failures don't be seem to be caused
by the driver.



Vadim


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org


  

-- 
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561
--------------040307010808090303020303--