Skip site navigation (1) Skip section navigation (2)

Unit test patches

From: John Lister <john(dot)lister-ps(at)kickstone(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Unit test patches
Date: 2009-05-01 09:56:16
Message-ID: 49FAC740.1060607@kickstone.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Hi, running the unit tests against the latest cvs, i get 3 failures...

Patches attached to correct them.

The first occurs in DatabaseMetaDataTest.testTables line 104:

It fetches all the columns for any table beginning with test - i happen 
to have other tables named test... which causes this to fail. I've 
modified it to look for the testmetadata table, alternatively the docs 
should be altered to state that the test database should be clean.

The second in TimeTest.timeTest : line 269 & 283:
The timezone tests fail because the as it happens local daylight savings 
is in effect, the code tries to test for this by submitting the time 
being tested, but this actually works out daylight savings for the time 
at the epoch (1/1/1970). I've modified it to use DST_OFFSET instead 
(note -  this may fail if ran during the switchover period).

and finally TimeTest.testGetTimeZone : line 84:
Fails because although the timezone offset is added to local_offset, the 
dst isn't taken into account. If DST is in effect the offset is out. 
I've corrected this by adding the DST_OFFSET value;


Also i did get an error on MiscTest.testSingleThreadCancel - but i can't 
repeat this... Is this expected?

    [junit] Testcase: 
testSingleThreadCancel(org.postgresql.test.jdbc2.MiscTest)
:       Caused an ERROR
    [junit] ERROR: canceling statement due to user request
    [junit] org.postgresql.util.PSQLException: ERROR: canceling 
statement due to
 user request
    [junit]     at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse
(QueryExecutorImpl.java:1646)
    [junit]     at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(Query
ExecutorImpl.java:1380)
...


Thanks

JOHN


Attachment: pgjdbc.patch
Description: text/plain (3.0 KB)

Responses

pgsql-jdbc by date

Next:From: Dave CramerDate: 2009-05-01 15:40:41
Subject: Re: Very strange performance decrease when reusing a PreparedStatement
Previous:From: Guy RouillierDate: 2009-04-29 15:21:08
Subject: Re: Begginer JDBC

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group